---
title: "checkOrgInvite"
---

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

# checkOrgInvite

Path: Forge API › invites

`POST /orgs/{org_id}/invite-checks`

Read what an invite's link is for, signed in or not: the org, who sent it, the email and role, and whether an account has the email. A used, revoked, or expired link is not found.

## Path parameters

- `org_id` (`checkOrgInvite.path.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Request body

_Required._

- `secret` (`checkOrgInvite.secret`; string, required)
  - minLength: `1`

## Example request

```json
{
  "secret": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/orgs/<org_id>/invite-checks' \
  --header 'Content-Type: application/json' \
  --data '
{
  "secret": "string"
}
'
```

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_id>/invite-checks';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({secret: 'string'})
};

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

### Python

```python
import requests

url = "<base-url>/orgs/<org_id>/invite-checks"

payload = { "secret": "string" }
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

OrgInvitePreview

#### Example

```json
{
  "email": "string",
  "owner": true,
  "invited_by_name": "string",
  "expires_at": "string",
  "org_id": "string",
  "org_name": "string",
  "org_slug": "string",
  "has_account": true
}
```

- `email` (`checkOrgInvite.response.200.email`; string, required)
  - pattern: `^[^\s@]+@[^\s@]+\.[^\s@]+$`
- `owner` (`checkOrgInvite.response.200.owner`; boolean, required)
- `invited_by_name` (`checkOrgInvite.response.200.invited_by_name`; string, required)
  - minLength: `1`
- `expires_at` (`checkOrgInvite.response.200.expires_at`; string, required)
  - minLength: `1`
- `org_id` (`checkOrgInvite.response.200.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `org_name` (`checkOrgInvite.response.200.org_name`; string, required)
  - minLength: `1`
- `org_slug` (`checkOrgInvite.response.200.org_slug`; string, required)
  - maxLength: `64` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*$`
- `has_account` (`checkOrgInvite.response.200.has_account`; boolean, required)

### 400

InvalidRequest | RequestBodyTooDeep

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

Any of the following:

- `InvalidRequestEncoded`
  - `_tag` (`InvalidRequestEncoded._tag`; string, required)
    - one of `"InvalidRequest"`
  - `part` (`InvalidRequestEncoded.part`; string, required)
    - one of `"path"`, `"query"`, `"headers"`, `"body"`
  - `issues` (`InvalidRequestEncoded.issues`; array of object, required)
    - `path` (`InvalidRequestEncoded.issues.path`; array\<any of\>, required)
      - any of the following: `string`, `integer`
    - `message` (`InvalidRequestEncoded.issues.message`; string, required)
- `RequestBodyTooDeepEncoded`
  - `_tag` (`RequestBodyTooDeepEncoded._tag`; string, required)
    - one of `"RequestBodyTooDeep"`
  - `max_depth` (`RequestBodyTooDeepEncoded.max_depth`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 404

InviteNotFound

#### Example

```json
{
  "_tag": "InviteNotFound"
}
```

- `_tag` (`checkOrgInvite.response.404._tag`; string, required)
  - one of `"InviteNotFound"`

### 413

RequestBodyTooLarge

#### Example

```json
{
  "_tag": "RequestBodyTooLarge",
  "max_bytes": -9007199254740991
}
```

- `_tag` (`checkOrgInvite.response.413._tag`; string, required)
  - one of `"RequestBodyTooLarge"`
- `max_bytes` (`checkOrgInvite.response.413.max_bytes`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`checkOrgInvite.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

OrgFailure | ControlPlaneFailure

#### Example

```json
{
  "_tag": "OrgFailure",
  "reason": "string"
}
```

Every option has:

- `reason` (`<option>.reason`; string, required)

Any of the following, each adding:

- `OrgFailureEncoded`
  - `_tag` (`OrgFailureEncoded._tag`; string, required)
    - one of `"OrgFailure"`
- `ControlPlaneFailureEncoded`
  - `_tag` (`ControlPlaneFailureEncoded._tag`; string, required)
    - one of `"ControlPlaneFailure"`

### 503

RateLimitUnavailable

#### Example

```json
{
  "_tag": "RateLimitUnavailable"
}
```

- `_tag` (`checkOrgInvite.response.503._tag`; string, required)
  - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/check-org-invite/index.md
