# Invite someone to the workspace

Mint an invite link for a named role (owner, admin, team_lead or member); the app composes the sign-in link around the token, which appears in THIS answer and nowhere else. Admin only, and an owner-role invite is an owner's to mint. Accepting is POST /v1/invites/accept, which any signed-in account may call because the acceptor has no seat here yet.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/invites`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "role": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "invite": {
      "acceptedAt": "string",
      "acceptedBy": "string",
      "createdAt": "string",
      "createdBy": "string",
      "expiresAt": "string",
      "id": "",
      "revokedAt": "string",
      "role": "string"
    },
    "token": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

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