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

# 招待作成

> ワークスペースに新しい招待を作成します

### Body

<ParamField body="email" type="string" required>
  招待する人のメールアドレス。
</ParamField>

<ParamField body="role" type="string" default="member">
  招待された人に割り当てる役割。`admin`、`member`のいずれか。
</ParamField>

<ParamField body="isUrlInvite" type="boolean" default="false">
  URL招待を作成するか（`true`）、メール招待を送信するか（`false`）。
</ParamField>

### レスポンス

<ResponseField name="invite" type="object">
  <Expandable title="Invite">
    <ResponseField name="id" type="string">
      招待の一意識別子。
    </ResponseField>

    <ResponseField name="email" type="string">
      招待された人のメールアドレス。
    </ResponseField>

    <ResponseField name="code" type="string">
      招待コード。
    </ResponseField>

    <ResponseField name="role" type="string">
      招待された人に割り当てられた役割。
    </ResponseField>

    <ResponseField name="expiresAt" type="string">
      招待が期限切れになるISO8601タイムスタンプ。
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      招待が作成されたISO8601タイムスタンプ。
    </ResponseField>

    <ResponseField name="isUrlInvite" type="boolean">
      URL招待かどうか。
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl --request POST \
    --url https://api.caret.so/v1/invites \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
    "email": "user@example.com",
    "role": "member",
    "isUrlInvite": false
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "invite": {
      "id": "inv_123",
      "email": "user@example.com",
      "code": "abc123xy",
      "role": "member",
      "expiresAt": "2026-02-27T10:00:00Z",
      "createdAt": "2026-01-28T10:00:00Z",
      "isUrlInvite": false
    }
  }
  ```
</ResponseExample>
