---
title: "Create log forwarding configuration"
method: POST
path: "/log/forwarding"
tags: ["Log Forwarding"]
---

# Create log forwarding configuration

`POST /log/forwarding`

## Request

- Base URL: `https://api.bunny.net/mc`
- URL: `https://api.bunny.net/mc/log/forwarding`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/magic-containers-api/docs/log/forwarding/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new log forwarding configuration.

## Request body

- CreateLogForwardingRequest
  - `app` string, required: App unique identifier
  - `type` 'SyslogUdp' | 'SyslogTcp', required: Log endpoint type
  - `endpoint` string, required: Log destination endpoint
  - `port` integer, required: Log destination port
  - `token` string: Token passed as field of syslog
  - `format` 'SyslogRfc3164' | 'SyslogRfc5424', required: Which Syslog RFC will be used
  - `enabled` boolean, required: Whether forwarding is enabled

## Response `201`

Log-forwarding configuration created successfully.

- LogForwardingConfiguration
  - `id` string: Unique identifier
  - `app` string: App unique identifier
  - `productId` string: Product unique identifier
  - `type` 'SyslogUdp' | 'SyslogTcp': Log endpoint type
  - `endpoint` string: Log destination endpoint
  - `port` integer: Log destination port
  - `createdAt` string, date-time: When the configuration was created
  - `token` string: Token passed as field of syslog
  - `format` 'SyslogRfc3164' | 'SyslogRfc5424': Which Syslog RFC will be used
  - `enabled` boolean: Whether forwarding is enabled

## Other responses

- `400`: Invalid input.
- `401`: User is unauthorized.
- `500`: Unexpected server error.

## Changes

- **2026-08-08** `0054dcaa32fb`: 1 info
  - api operation id `CreateLogForwardingConfiguration` was added

[Operation history](https://skmtc.dev/bunny/apis/magic-containers-api/changes/log/forwarding/post.md)

---

[API](https://skmtc.dev/bunny/apis/magic-containers-api.md) - [All operations](https://skmtc.dev/bunny/apis/magic-containers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/magic-containers-api/revisions/7bb58a0591b0?raw)
