---
title: "Create config"
method: POST
path: "/cdn/logs_uploader/configs"
tags: ["Logs uploader"]
---

# Create config

`POST /cdn/logs_uploader/configs`

Create logs uploader config.

## Request body

- CreateLogsUploaderConfig
  - `enabled` boolean — Enables or disables the config.
  - `name` string, required — Name of the config.
  - `policy` integer, required — ID of the policy that should be assigned to given config.
  - `target` integer, required — ID of the target to which logs should be uploaded.
  - `for_all_resources` boolean — If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the `resources` field.
  - `resources` integer[] — List of resource IDs to which the config should be applied.

## Response `201`

Successful.

- LogsUploaderConfigResponse
  - `id` integer
  - `client_id` integer — Client that owns the config.
  - `created` string, date-time — Time when the config was created.
  - `updated` string, date-time — Time when the config was updated.
  - `enabled` boolean — Enables or disables the config.
  - `name` string — Name of the config.
  - `policy` integer — ID of the policy that should be assigned to given config.
  - `target` integer — ID of the target to which logs should be uploaded.
  - `for_all_resources` boolean — If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the `resources` field.
  - `resources` integer[] — List of resource IDs to which the config should be applied.
  - `status` object — Validation status of the logs uploader config.
    - `status` 'in_progress' | 'successful' | 'failed' — Status of the validation.
    - `code` integer — Error code indicating the type of validation error.
    - `updated` string, date-time — Time when the validation status was updated.
    - `details` string — Error message if the validation failed.

## Other responses

- `400` — You will receive an error with the invalid parameter mentioned.
- `403` — Feature is disabled for your account.

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
