---
title: "Get function logs"
method: GET
path: "/compute/funcs/{id}/logs"
tags: ["functions"]
---

# Get function logs

`GET /compute/funcs/{id}/logs`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/compute/funcs/{id}/logs`
- Auth: HTTP bearer

Returns logs oldest first. `type=runtime` (default) returns function stdout/stderr. `type=invocations` returns one platform-generated record per HTTP request served.

## Path parameters

- `id` string, required

## Query parameters

- `type` 'runtime' | 'invocations'
- `start_time` string, date-time
- `end_time` string, date-time
- `limit` integer

## Response `200`

Logs retrieved successfully

- union
  - FuncRuntimeLogsResponse
    - `meta` LogsMeta
      - `has_more` boolean
      - `partial` boolean
    - `data` FuncRuntimeLog[]
      - `record_type` 'compute_func_runtime_log'
      - `timestamp` string, date-time
      - `level` string
      - `message` string
  - FuncInvocationLogsResponse
    - `meta` LogsMeta
      - `has_more` boolean
      - `partial` boolean
    - `data` FuncInvocationLog[]
      - `record_type` 'compute_func_invocation_log'
      - `timestamp` string, date-time
      - `method` string
      - `path` string
      - `status_code` integer
      - `duration_ms` number
      - `request_size_bytes` integer
      - `response_size_bytes` integer
      - `region` string

## Other responses

- `400`: Invalid query parameter
- `404`: Function not found
- `422`: Invalid function ID
- `500`: Internal server error

## Changes

- **2026-10-21** `67df31283a8a`: 4 breaking, 4 info
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `400`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `404`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `422`
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `500`
  - …4 more
- **2026-10-15** `a72569d69430`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/team-telnyx/apis/telnyx-api/changes/compute/funcs/:id/logs/get.md)

---

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