# OTLP/HTTP logs export

`POST /v1/logs`

An OpenTelemetry ExportLogsServiceRequest as protobuf or OTLP JSON; Content-Encoding: gzip is accepted. When some records are unusable, partial_success carries rejected_log_records and an error_message; the rest are accepted. OTLP/gRPC is served on :4317 (LogsService/Export).

## Authentication

A project API key: `Authorization: Bearer <API key>`.

## Request body

`application/json`

```json
{
  "description": "ExportLogsServiceRequest in OTLP JSON.",
  "type": "object"
}
```

`application/x-protobuf`

## Responses

### 200

ExportLogsServiceResponse, in the request's format.

`application/json`

```json
{
  "description": "ExportLogsServiceResponse in OTLP JSON.",
  "type": "object"
}
```

`application/x-protobuf`

### 400

malformed-body: the body cannot be decoded.

Problem type: [malformed-body](https://docs.dlogify.com/errors/malformed-body.md).

### 401

unauthorized: missing, invalid or revoked API key.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 413

payload-too-large: the body or the batch exceeds the plan's limit.

Problem type: [payload-too-large](https://docs.dlogify.com/errors/payload-too-large.md).

### 415

unsupported-media-type or unsupported-encoding.

A problem document: see [Errors](https://docs.dlogify.com/errors.md).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

rate-limited: event quota, concurrent requests or backpressure.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X POST "https://api.dlogify.com/v1/logs" \
  -H "Authorization: Bearer $LOGIFY_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body
```

Source: https://docs.dlogify.com/api/ingestion/exportLogs
