---
title: "acceptInvite"
---

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

# acceptInvite

Path: agenthold API › invites

`POST /invites/{token}/accept`

URL: `/api/v1/invites/{token}/accept`

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `token` (`acceptInvite.path.token`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/api/v1/invites/<token>/accept' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/invites/<token>/accept';
const options = {
  method: 'POST',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

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

### Python

```python
import requests

url = "<base-url>/api/v1/invites/<token>/accept"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

Joined. Returns the workspace.

#### Example

```json
{
  "id": "string",
  "name": "string",
  "personal": true,
  "role": "owner",
  "createdAt": "2019-08-24T14:15:22Z"
}
```

- `id` (`acceptInvite.response.200.id`; string, required)
- `name` (`acceptInvite.response.200.name`; string, required)
- `personal` (`acceptInvite.response.200.personal`; boolean, required)
- `role` (`acceptInvite.response.200.role`; string, required)
  - one of `"owner"`, `"admin"`, `"member"`
- `createdAt` (`acceptInvite.response.200.createdAt`; string, required)
  - format: `date-time`

### 403

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`acceptInvite.response.403.error`; string, required)

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`acceptInvite.response.404.error`; string, required)

### 409

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`acceptInvite.response.409.error`; string, required)


Source: https://agenthold.dev/api/accept-invite/index.md
