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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 按 email 查找用户

> 通过 email 地址而非用户 ID 查找组织用户

返回已认证组织内 email 地址与给定值匹配的用户。如果您有 email 地址但没有 Yuno 用户 ID，可使用此 endpoint 查找用户记录。

> [!NOTE]
>
> **组织范围和空结果**
>
> 结果始终限定在发起调用的组织内。如果同一 email 存在于其他组织中，它不会出现在此处。当组织中没有用户与该地址匹配时，响应会包含一个空的 `data` 数组，而不是错误。


## OpenAPI

````yaml openapi/zh-hans/organizations/find-user-by-email.json GET /organizations/users
openapi: 3.1.0
info:
  title: Users API - Find by Email
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /organizations/users:
    get:
      summary: 按电子邮箱查找用户
      description: >-
        返回电子邮箱与给定地址匹配的用户，范围限定为已认证组织。同一个电子邮箱地址可能属于多个组织中的用户；仅返回调用方组织内的匹配项。当没有任何用户使用该电子邮箱时，响应包含空的
        `data` 数组，这不是错误。
      operationId: find-user-by-email
      parameters:
        - name: email
          in: query
          required: true
          schema:
            type: string
            format: email
          description: 要搜索的电子邮箱地址。必须完全匹配，不区分大小写。
      responses:
        '200':
          description: OK：零个或多个与该电子邮箱地址匹配的用户。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 在调用方组织内，电子邮箱与所请求地址匹配的用户列表。没有匹配项时为空。
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Yuno 生成的用户唯一标识符。
                        email:
                          type: string
                          description: 用户的电子邮箱地址。
                        first_name:
                          type: string
                          description: 用户的名。
                        last_name:
                          type: string
                          description: 用户的姓。
                        account_permissions:
                          type: array
                          description: 分配给该用户的账户级权限列表。
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                                format: uuid
                                description: 该权限适用的账户。
                              role_id:
                                type: string
                                description: 该用户在此账户上被分配的角色。
                        account_group_permissions:
                          type: array
                          description: 分配给该用户的账户组级权限列表。
                          items:
                            type: object
                            properties:
                              account_group_id:
                                type: string
                                format: uuid
                                description: 该权限适用的账户组。
                              role_id:
                                type: string
                                description: 该用户在此账户组上被分配的角色。
                        created_at:
                          type: string
                          format: date-time
                          description: 用户创建时间的 ISO 8601 时间戳。
                        updated_at:
                          type: string
                          format: date-time
                          description: 最近一次更新时间的 ISO 8601 时间戳。
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_items:
                        type: integer
                      total_pages:
                        type: integer
                      has_next:
                        type: boolean
                      has_previous:
                        type: boolean
              examples:
                match_found:
                  summary: User found
                  value:
                    data:
                      - id: f1e2d3c4-b5a6-7890-fedc-ba0987654321
                        email: jane.doe@acme.com
                        first_name: Jane
                        last_name: Doe
                        account_permissions:
                          - account_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                            role_id: ADMIN
                        account_group_permissions: []
                        created_at: '2024-01-10T09:00:00Z'
                        updated_at: '2024-05-20T14:15:00Z'
                    pagination:
                      page: 1
                      page_size: 20
                      total_items: 1
                      total_pages: 1
                      has_next: false
                      has_previous: false
                no_match:
                  summary: No user matched — empty result
                  value:
                    data: []
                    pagination:
                      page: 1
                      page_size: 20
                      total_items: 0
                      total_pages: 0
                      has_next: false
                      has_previous: false
        '400':
          description: 请求错误：缺少 `email` 查询参数，或其不是有效的电子邮箱地址。
        '401':
          description: 未授权：API 凭据无效或缺失。
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.