---
raw: true
search:
  tags:
    - Access
    - POST
seo:
  description: >-
    Approves a pending request and adds… Reference for the POST
    /v1/spaces/{spaceId}/access-requests/{requestId}/approve endpoint in the
    Spacefast Partner API.
sidebar:
  label: Approve an access request
  badge: POST
title: Approve an access request
type: openapi-operation
---
Approves a pending request and adds the requester to the space's people with a live-site grant. A `commenter` role needs the Space's comments surface set to `everywhere`; under `previews` (the default) approve as `viewer`, or get 422 `comments_target_unavailable`.

`POST /v1/spaces/{spaceId}/access-requests/{requestId}/approve`

**Request body** (`application/json`, required)

- `scope` (string)
- `role` (string)

Request body example:

```json
{
  "scope": "string",
  "role": "viewer"
}
```

**Responses**

- `200` — Response for status 200
- `default` — Problem details (RFC 9457). Any 4xx/5xx response is one \`application/problem+json\` document.

Response example, 200:

```json
{
  "$schema": "http://example.com",
  "data": {
    "id": "string",
    "spaceId": "string",
    "displayName": "string",
    "email": "user@example.com",
    "scope": "string",
    "requestedRole": "viewer",
    "message": "string",
    "status": "verification_pending",
    "emailVerifiedAt": "2019-08-24T14:15:22Z",
    "resolvedBy": "string",
    "resolvedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
```
