---
title: "Create Logs"
method: POST
path: "/api/logs/"
tags: ["Logs"]
---

# Create Logs

`POST /api/logs/`

## Request

- The document declares no server URL.
- Auth: none declared

Create new logs from the provided schema.

## Headers

- `x-prefect-api-version` string

## Request body

- LogCreate[]
  - `name` string, required: The logger name.
  - `level` integer, required: The log level.
  - `message` string, required: The log message.
  - `timestamp` string, date-time, required: The log timestamp.
  - `flow_run_id` string, uuid
  - `task_run_id` string, uuid

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2024-04-03** `93ae2b3f2efd`: 4 breaking
  - the request property `items/level` became required
  - the request property `items/message` became required
  - the request property `items/name` became required
  - the request property `items/timestamp` became required

[Operation history](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/changes/api/logs/post.md)

---

[API](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api.md) - [All operations](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/llms.txt) - [OpenAPI document](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/revisions/29ba6c4f8837?raw)
