---
title: "Configure log export destination"
method: PUT
path: "/compute/funcs/{id}/logs/export"
tags: ["functions"]
---

# Configure log export destination

`PUT /compute/funcs/{id}/logs/export`

Configures the external OTLP endpoint a function's runtime and/or invocation logs are pushed to as they happen. This operation is a **full replace, not a patch**: `endpoint`, `headers`, `runtime_export_enabled`, and `invocation_export_enabled` are all required on every call — omitting any of them is a 422, not "keep the current value". Headers are encrypted at rest and never returned in any response.

The endpoint must be an HTTPS URL. When export is configured, new log records are converted to OTLP log records and delivered continuously; export never bypasses platform log storage, and delivery retries with a bounded policy while the destination is unreachable. Only logs generated after configuration are exported — there is no historical replay.

## Path parameters

- `id` string, required

## Request body

- FuncLogExportConfigSetRequest — Full-replace configuration body. All fields are required on every call: the API treats PUT as a replace (RFC 7231), so omitting any field is a 422, not "keep the current value".
  - `endpoint` string, uri, required — HTTPS URL to push logs to
  - `headers` object, required — Headers attached to every export push, as key-value pairs (e.g. an auth token the collector expects). Required even when empty — {} means "no headers". Encrypted at rest; never returned.
  - `runtime_export_enabled` boolean, required — Export runtime logs (function stdout/stderr) to this destination
  - `invocation_export_enabled` boolean, required — Export invocation records (one per HTTP request) to this destination

## Response `200`

Log export configuration replaced successfully

- FuncLogExportConfigResponse
  - `data` FuncLogExportConfig — Metadata-only view of a function's log export destination. Header values are write-only (encrypted server-side) and never appear in any response.
    - `record_type` 'compute_func_log_export_config'
    - `id` string — Configuration record ID
    - `func_id` string — Function ID this configuration belongs to
    - `endpoint` string, uri — HTTPS OTLP endpoint URL logs are pushed to
    - `enabled` boolean — Whether export is enabled for this function
    - `runtime_export_enabled` boolean — Whether runtime logs (function stdout/stderr) are exported
    - `invocation_export_enabled` boolean — Whether invocation records (one per HTTP request) are exported
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `201` — Log export configuration created
- `400` — Invalid request body
- `401` — Unauthorized
- `404` — Function not found
- `422` — Invalid function ID, or a required request field was omitted (full replace — no partial updates)
- `500` — Internal server error

## Changes

> 92 revisions in range; 1 not diffed.

- **2026-09-21** `673109139443` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/compute/funcs/:id/logs/export/put.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/d8b8159753ee?raw)
