---
title: "Query service logs"
method: GET
path: "/v1/projects/{project_id}/service_logs"
tags: ["Service"]
---

# Query service logs

`GET /v1/projects/{project_id}/service_logs`

## Request

- Base URL: `https://api.telerivet.com`
- URL: `https://api.telerivet.com/v1/projects/{project_id}/service_logs`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://telerivet.com/oauth/authorize`, token URL `https://api.telerivet.com/oauth/token`)

Queries service log entries associated with this project.

 Note: Service logs are automatically deleted and no longer available via the API after approximately one month.

## Path parameters

- `project_id` string, required

## Query parameters

- `service_id` string: ID of Service
- `message_id` string: ID of Message
- `contact_id` string: ID of Contact
- `time_created` integer: Unix timestamp in seconds
- `execution_stats` boolean
- `sort_dir` 'asc' | 'desc'
- `page_size` integer
- `offset` integer
- `marker` string
- `count` boolean

## Response `200`

Successful response. When count=1 parameter is provided, returns {"count": N} instead.

- object
  - `data` object[]: Array of results (omitted when count=1)
  - `truncated` boolean: True if there are more results
  - `next_marker` string: Marker for pagination
  - `page_size` integer: Number of results per page
  - `sort_dir` 'asc' | 'desc': Sort direction
  - `count` integer: Total count of matching items (only when count=1 parameter is provided)

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key or Bearer token
- `404`: Resource not found

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
