---
title: "getInvite"
---

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

# getInvite

Path: agenthold API › invites

`GET /invites/{token}`

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

## Authentication

Requires one of the following:

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

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = '<base-url>/api/v1/invites/<token>';
const options = {
  method: 'GET',
  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>"

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

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

print(response.text)
```

## Responses

### 200

What accepting this invite would do.

#### Example

```json
{
  "workspaceId": "string",
  "workspaceName": "string",
  "role": "admin",
  "invitedBy": "string",
  "expiresAt": "2019-08-24T14:15:22Z",
  "alreadyMember": true
}
```

- `workspaceId` (`getInvite.response.200.workspaceId`; string, required)
- `workspaceName` (`getInvite.response.200.workspaceName`; string, required)
- `role` (`getInvite.response.200.role`; string, required)
  - one of `"admin"`, `"member"`
- `invitedBy` (`getInvite.response.200.invitedBy`; string, required)
- `expiresAt` (`getInvite.response.200.expiresAt`; string, required)
  - format: `date-time`
- `alreadyMember` (`getInvite.response.200.alreadyMember`; boolean, required)

### 404

Error.

#### Example

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

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


Source: https://agenthold.dev/api/invites/retrieve/index.md
