# invites.preview

> POST https://app.intraface.cc/api/v1/invites/preview

A signed-in person (Clerk session cookie). Agent tokens are refused. Body limit: 256 KB.

**Auth:** signed-in session (`__session` cookie)

## Request body (application/json)

```json
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 20,
      "maxLength": 200
    }
  },
  "required": [
    "token"
  ]
}
```

## Responses

### 200: Success.

application/json:

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "const": "member"
        },
        "board_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "slug": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
        },
        "role": {
          "type": "string",
          "enum": [
            "owner",
            "editor",
            "contributor",
            "commenter",
            "viewer"
          ]
        }
      },
      "required": [
        "state",
        "board_id",
        "slug",
        "role"
      ]
    },
    {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "const": "invite"
        },
        "board": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "slug": {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
            },
            "title": {
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "travel",
                "compliance",
                "review",
                "launch",
                "dossier",
                "blank",
                "upload"
              ]
            },
            "head_n": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "updated_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "thumb_url": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uri"
                },
                {
                  "type": "null"
                }
              ]
            },
            "publishes_this_week": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "slug",
            "title",
            "type",
            "head_n",
            "updated_at",
            "thumb_url",
            "publishes_this_week"
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "editor",
            "contributor",
            "commenter",
            "viewer"
          ]
        },
        "upgrade_from": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "owner",
                "editor",
                "contributor",
                "commenter",
                "viewer"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "inviter": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "image_url": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "name",
                "image_url"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "members": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "people": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "image_url": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "image_url"
                ]
              }
            }
          },
          "required": [
            "count",
            "people"
          ]
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        }
      },
      "required": [
        "state",
        "board",
        "role",
        "upgrade_from",
        "inviter",
        "members",
        "expires_at"
      ]
    },
    {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "const": "wrong_account"
        },
        "masked_email": {
          "type": "string"
        }
      },
      "required": [
        "state",
        "masked_email"
      ]
    },
    {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "const": "unusable"
        },
        "reason": {
          "type": "string",
          "enum": [
            "used",
            "expired",
            "revoked",
            "taken_down"
          ]
        },
        "board_title": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "state",
        "reason",
        "board_title"
      ]
    }
  ]
}
```

### default

Any other error, in the shared envelope `{ error: { code, message, hint?, details? } }`.
