---
title: "Creates a Configurable Log Drain (deprecated)"
method: POST
path: "/v1/log-drains"
tags: ["logDrains"]
---

# Creates a Configurable Log Drain (deprecated)

`POST /v1/log-drains`

Creates a configurable log drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed)

## Query parameters

- `teamId` string
- `slug` string

## Request body

- object
  - `deliveryFormat` 'json' | 'ndjson', required — The delivery log format
  - `url` string, uri, required — The log drain url
  - `headers` object — Headers to be sent together with the request
  - `projectIds` string[]
  - `sources` string[], required
  - `environments` string[]
  - `secret` string — Custom secret of log drain
  - `samplingRate` number — The sampling rate for this log drain. It should be a percentage rate between 0 and 100. With max 2 decimal points
  - `name` string — The custom name of this log drain.

## Response `200`

- object

## Other responses

- `400` — One of the provided values in the request body is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `410`

---

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