Create an OTLP export

Create an OTLP export. The export sends metrics from the time you create it. To check that the receiver accepts the metrics, send a test.

POST https://{availability_zone}.betterstackcloud.com/v1/otlp
Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string required

The export's name, up to 255 characters. Must be unique in the organization.

endpoint string required

The base URL of your OTLP receiver over HTTP, such as https://otlp.example.com. We add /v1/metrics unless the URL already ends with it. Must use https and have up to 2048 characters. Can't include credentials, a query string or a fragment. An IP address in a private, loopback, link-local or multicast range is refused.

resource_types array of strings required

What the export sends metrics of. Use server. Can't be empty.

team_id string required

The ID of the team whose metrics the export sends. betterstack team list shows it.

headers object

The headers your receiver needs, such as Authorization, as an object that maps each header to a string value. You can send up to 16 headers, 8 KiB in total. Content-Type, Content-Encoding, User-Agent and hop-by-hop headers aren't allowed. An update replaces all headers. Responses return only the names, in header_names. Accepts any keys.

temporality string default: cumulative

How we send the byte counters. Defaults to cumulative.
Valid values:
cumulative: Each data point holds the total since the series started.
delta: Each data point holds the bytes of one interval. Prometheus-based backends refuse delta.

status string default: active

Whether the export is sending. A paused export set to active again sends metrics from that moment on.
Valid values:
active: The export sends metrics every minute.
paused: The export sends nothing.

201 Created
{
  "id": "example",
  "name": "Example OTLP export",
  "endpoint": "https://otlp.example.com",
  "header_names": [
    "Example"
  ],
  "resource_types": [
    "server"
  ],
  "temporality": "cumulative",
  "status": "active",
  "paused_reason": "delivery_failed",
  "last_delivered_at": "2026-07-01T12:00:00.000Z",
  "last_error": "example",
  "last_error_at": "2026-07-01T12:00:00.000Z",
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "team_id": "t123"
}

Returns the newly created OTLP export.

id string

The export's ID, a UUID.

name string

The export's name, up to 255 characters.

endpoint string

The base URL of your OTLP receiver over HTTP, such as https://otlp.example.com. We add /v1/metrics unless the URL already ends with it.

header_names array of strings

The names of the export's headers, in alphabetical order.

resource_types array of strings

What the export sends metrics of. Use server.

temporality string

How we send the byte counters. Defaults to cumulative.
Valid values:
cumulative: Each data point holds the total since the series started.
delta: Each data point holds the bytes of one interval. Prometheus-based backends refuse delta.

status string

Whether the export is sending. A paused export set to active again sends metrics from that moment on.
Valid values:
active: The export sends metrics every minute.
paused: The export sends nothing.

paused_reason string or null

Why we paused the export, or null while the export is active or when you paused it.
Valid values:
delivery_failed: No request reached the receiver for 24 hours.
destination_refused: The endpoint's hostname resolved to a private or otherwise refused address.

last_delivered_at datetime or null

When the receiver last accepted a request. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

last_error string or null

Why the last delivery failed, such as HTTP 401, or how many data points the receiver rejected. last_error is null after a delivery without a problem.

last_error_at datetime or null

When the error in last_error happened. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

created_at datetime

When the export was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the export was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

team_id string

The ID of the team whose metrics the export sends. betterstack team list shows it.