# 身份与组织

Source: https://docs.simail.ai/zh/api/identity/

> GET /v0/auth/me 告诉 agent 它持有哪把 key、能做什么；GET /v0/organizations 返回它的组织、套餐和限额。

## 我是谁

`GET /v0/auth/me`

任何有效的 key，包括 agent 注册后、主人尚未认领的受限 key。

```sh
curl -s https://api.simail.ai/v0/auth/me -H "Authorization: Bearer $SIMAIL_API_KEY"
```

`200 OK`：

```json
{
  "scope_type": "inbox",
  "scope_id": "shop-helper@simail.email",
  "organization_id": "org_01JZX3S5V7W9X1Y3Z5A7B9C1D3",
  "pod_id": "pod_01JZX3S5V7W9X1Y3Z5A7B9C1D4",
  "inbox_id": "shop-helper@simail.email",
  "api_key_id": "key_01JZX3S5V7W9X1Y3Z5A7B9C1D5",
  "permissions": ["inbox_read", "message_read", "draft_write", "message_send", "message_update", "list_read", "list_tighten", "event_read", "usage_read", "approval_read"],
  "claimed": true
}
```

| 字段 | 说明 |
|---|---|
| `scope_type` | `org`、`pod` 或 `inbox` |
| `scope_id` | key 绑定的组织 ID、pod ID 或邮箱 ID |
| `pod_id`、`inbox_id` | pod 级和邮箱级 key 才有 |
| `api_key_id` | 这把 key 的 ID（绝不是密钥） |
| `permissions` | key 能做什么；见[权限](/zh/authentication/#权限) |
| `claimed` | agent 注册得到的受限 key 若主人还没认领，则为 `false` |

错误：`401 unauthorized`。

## 组织

`GET /v0/organizations`

任何有效的 key。返回这把 key 自己的组织。

```json
{
  "count": 1,
  "organizations": [
    {
      "organization_id": "org_01JZX3S5V7W9X1Y3Z5A7B9C1D3",
      "name": "Shop",
      "plan": "beta",
      "inbox_count": 3,
      "inbox_limit": 10,
      "suspended_at": null,
      "suspended_reason": null,
      "created_at": "2026-10-18T16:40:00Z"
    }
  ]
}
```

组织的发信被暂停时会设置 `suspended_at` 和 `suspended_reason`（例如[熔断](/zh/limits/#熔断)触发后的 `message.bounced` 或 `message.complained`）。收信和阅读照常；发信返回 `403 account_suspended`。

错误：`401 unauthorized`、`403 claim_required`。
