---
title: "Create Request Log"
method: POST
path: "/v1/request-logs"
tags: ["request-logs"]
---

# Create Request Log

`POST /v1/request-logs`

## Request

- Base URL: `https://api.cyberdesk.io`
- URL: `https://api.cyberdesk.io/v1/request-logs`
- Auth: HTTP bearer

Create a new request log.

The machine must exist and belong to the authenticated organization.
This is typically called when a request is initiated.

## Headers

- `Idempotency-Key` string

## Request body

- RequestLogCreate: Schema for creating a request log
  - `request_id` string, required
  - `method` string, required
  - `path` string, required
  - `status_code` integer, nullable
  - `request_size_bytes` integer, nullable
  - `response_size_bytes` integer, nullable
  - `duration_ms` integer, nullable
  - `error_message` string, nullable
  - `machine_id` string, uuid, required

## Response `201`

Successful Response

- RequestLogResponse: Request log response schema
  - `request_id` string, required
  - `method` string, required
  - `path` string, required
  - `status_code` integer, nullable
  - `request_size_bytes` integer, nullable
  - `response_size_bytes` integer, nullable
  - `duration_ms` integer, nullable
  - `error_message` string, nullable
  - `id` string, uuid, required
  - `machine_id` string, uuid, required
  - `organization_id` string, nullable
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud.md) - [All operations](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/revisions/5579352ae05e?raw)
