---
title: "Create a new log."
method: POST
path: "/v3/logs"
tags: ["Logs"]
---

# Create a new log.

`POST /v3/logs`

Required permission: `logs_write`

## Request body

- CreateLog
  - `name` string, required — Name of the new log.
  - `color` string — Color of the log. The color must be one of the following (green on unknown value or missing): green, lightgreen, lime, yellow, orange, deeporange, red, pink, purple, deeppurple, blue, lightblue
  - `environmentName` string — Environment name of the new log. Must match an environment name (case insensitive). If a matching environment name was not found or the property is not set, the log will appear under "Other" in the UI.
  - `disabled` boolean — Set to true to disable the log on creation. Defaults to false. A log can be enabled/disabled afterwards by calling the _disable and _enable endpoints.

## Response `201`

Log where successfully created.

- CreateLogResult
  - `location` string, uri — The location of the created log.

## Other responses

- `400` — Something wrong with the parameters.
- `401` — API key not valid or no access to resource.
- `402` — Tried to call the logs API but the trial expired.
- `429` — A maximum of 500 requests per minute and 3600 requests per hour are permitted

---

[API](https://skmtc.net/elmah/apis/elmah-io-api.md) · [All operations](https://skmtc.net/elmah/apis/elmah-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elmah/elmah-io-api/versions/8e9c6e56e4fa/schema)
