---
title: "Access requests"
description: "The access requests endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Access requests

## GET /access-requests

List the open Comment access requests on folders the caller manages.

Lists the open requests on dashboards and observations whose folder the caller may manage, newest first, at most 100. Grant one by giving the requester Comment on the folder (`PUT /folders/{id}/permissions`) or by raising their role; this list changes nothing. An object in General (`folder.general`) cannot be granted that way, because General takes no entry: raise the requester's role or move the object to another folder.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The open requests. | `object` |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /access-requests

Ask for Comment access to a dashboard or observation the caller can view.

Puts a request, with the optional one-line note, in the inbox of the people who manage the sharing of the object's folder: its creator while they are an Editor and anyone with Admin on it by an entry, or every Admin of the workspace when the folder has none of them. It changes no access, and the answer never names who received it. A person or a service-account key may ask. The request closes when the requester can comment, after a folder access change or a role change, when a person who received it marks its inbox item done, or after 30 days. An object the caller cannot view answers 404 `not_found`, like an unknown id.

### Request body

`application/json`, required.

| Field | Type | Description |
| --- | --- | --- |
| `object` (required) | `object` |   |
| `note` | `string` | Trimmed before it is stored; one line of at most 200 characters for the people who can grant access. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `201` | The request is open. | [`AccessRequest`](/docs/reference/api/schemas/#accessrequest) |
| `400` | The body is malformed (`invalid_request`) or the note has a line break or is over 200 characters (`invalid_note`). | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | The caller can already comment on the object (`already_can_comment`), or already has an open request on it (`request_open`, with `requested_at`, which its message names too). | [`Error`](/docs/reference/api/schemas/#error) |
| `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
