# GET /domains/{name}/logs/{type}/content

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the domains group.

Get a domain's access, error or PHP error log as base64

- Who may call it: administrator, reseller, customer
- Token scope, any of: domains, read, all
- Answers: 200 OK

The response contains base64-encoded log content that you can decode and save as a file. If the log exceeds the file manager limit set by files.upload_limit_mb, UrbeStack returns the newest portion starting at a line boundary and sets cut.

Returns 400 for a type other than access, error or php. Returns 404 if the domain or the requested log does not exist. Access to an existing domain is limited to administrators, the domain owner and the owner's reseller. Other callers receive 403.

## As a command

- [urbestack-domain-log](https://urbestack.com/docs/commands/urbestack-domain-log.md): Reads a domain's access, error or PHP error log.

## Parameters

- `name` (path, DomainName, required)
- `type` (path, string, one of access, error, php, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/domains/example.com/logs/access/content" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "content": "text",
  "cut": true,
  "domain": "example.com",
  "exists": true,
  "file": "urbestack-panel-20260909T101500Z.json.enc",
  "size": 1,
  "type": "rebuild"
}
```

## Errors

- 400: --after is a number of bytes, 0 or more
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 400: Log type must be access, error or php
- 401: Authentication required
- 403: Insufficient privileges
- 404: <name> has no <type> log yet
- 404: Domain '<name>' not found
