---
title: "Accept invite"
---

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

Path: Sureshake API › collections

`POST /v2/collections/invites/{code}`

## Path parameters

- `code` (`collection-accept-invite.path.code`; string, required)
  - minLength 1

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/collections/invites/<code>'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/collections/invites/<code>';
const options = {method: 'POST'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/collections/invites/<code>"

response = requests.post(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "success": true,
    "collectionId": "0ffe69e2-b7af-4b1e-835c-867376165f50",
    "permission": "viewer",
    "redirectTo": "string"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`collection-accept-invite.response.200.data`; object, required)
  - `success` (`collection-accept-invite.response.200.data.success`; boolean, required)
  - `collectionId` (`collection-accept-invite.response.200.data.collectionId`; string, required)
    - format `uuid`
  - `permission` (`collection-accept-invite.response.200.data.permission`; string, required)
    - one of `"viewer"`, `"download"`
  - `redirectTo` (`collection-accept-invite.response.200.data.redirectTo`; string, required)
- `meta` (`collection-accept-invite.response.200.meta`; object, optional)
  - `timestamp` (`collection-accept-invite.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.400.error`; object, required)
  - `code` (`collection-accept-invite.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.401.error`; object, required)
  - `code` (`collection-accept-invite.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.403.error`; object, required)
  - `code` (`collection-accept-invite.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.404.error`; object, required)
  - `code` (`collection-accept-invite.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.409.error`; object, required)
  - `code` (`collection-accept-invite.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`collection-accept-invite.response.500.error`; object, required)
  - `code` (`collection-accept-invite.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`collection-accept-invite.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`collection-accept-invite.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`collection-accept-invite.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/collection-accept-invite/index.md
