> ## 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.

# 列出 Webhook

> 列出账户上配置的 webhook，可按状态筛选

列出账户上配置的 webhook，其中的密钥以掩码形式返回。没有 webhook 的账户会返回空数组。

传入 `state=ACTIVE` 或 `state=INACTIVE` 可仅列出处于该状态的 webhook，省略该参数则列出全部 webhook。

[Yuno Dashboard](https://docs.y.uno/zh-hans/docs/webhooks/configure-webhooks.md) 的 Developers 选项卡中也列出了相同的 webhook。


## OpenAPI

````yaml openapi/zh-hans/webhooks/manage-webhooks.json GET /webhooks
openapi: 3.1.0
info:
  title: webhooks-manage-webhooks
  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:
  /webhooks:
    get:
      summary: 列出 Webhook
      description: 返回账户上配置的 webhook，其密钥信息已做掩码处理。按 `state` 过滤，可以只列出启用的或停用的 webhook。
      operationId: list-webhooks
      parameters:
        - name: account_id
          in: query
          required: true
          description: webhook 所属账户的唯一标识符。
          schema:
            type: string
            format: uuid
            example: 493e9374-510a-4201-9e09-de669d75f256
            x-default: 493e9374-510a-4201-9e09-de669d75f256
        - name: state
          in: query
          required: false
          description: 仅返回处于此状态的 webhook。省略则返回全部。
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
            example: ACTIVE
      responses:
        '200':
          description: 账户上配置的 webhook，如果没有则为空数组。
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
              example:
                - id: '12345'
                  account_id: 493e9374-510a-4201-9e09-de669d75f256
                  name: Production payments listener
                  state: ACTIVE
                  url: https://api.acme.com/yuno/webhooks
                  api_key: '***'
                  secret: '***'
                  hmac_client_secret: '***'
                  oauth2_authentication_url: null
                  oauth2_client_secret: null
                  oauth2_client_id: null
                  oauth2_grant_type: null
                  oauth2_scope: null
                  oauth2_authorization_name: null
                  oauth2_include_client_id: false
                  enrollment_triggers: []
                  payment_triggers:
                    - AUTHORIZE
                    - CAPTURE
                    - REFUND
                  report_triggers: []
                  subscription_triggers: null
                  onboarding_triggers: null
                  renewal_days: null
                  created_at: '2026-07-09T13:05:36.482913Z'
                  updated_at: '2026-07-09T13:05:36.482913Z'
                - id: '12346'
                  account_id: 493e9374-510a-4201-9e09-de669d75f256
                  name: Subscription renewals
                  state: INACTIVE
                  url: https://api.acme.com/yuno/subscriptions
                  api_key: '***'
                  secret: '***'
                  hmac_client_secret: null
                  oauth2_authentication_url: null
                  oauth2_client_secret: null
                  oauth2_client_id: null
                  oauth2_grant_type: null
                  oauth2_scope: null
                  oauth2_authorization_name: null
                  oauth2_include_client_id: false
                  enrollment_triggers: []
                  payment_triggers: []
                  report_triggers: []
                  subscription_triggers:
                    - CREATE
                    - CLOSE_TO_RENEWAL
                  onboarding_triggers: null
                  renewal_days: 5
                  created_at: '2026-07-10T09:41:12.204518Z'
                  updated_at: '2026-07-11T16:20:44.918330Z'
        '400':
          $ref: '#/components/responses/InvalidListRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          description: webhook 的唯一标识符。
          example: '12345'
        account_id:
          type: string
          format: uuid
          description: webhook 所属账户的唯一标识符。
          example: 493e9374-510a-4201-9e09-de669d75f256
        name:
          type: string
          description: 您为 webhook 起的名称。
          example: Production payments listener
        state:
          type: string
          description: '`ACTIVE` 的 webhook 会接收通知，`INACTIVE` 的不会。webhook 创建时为 `ACTIVE`。'
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        url:
          type: string
          description: Yuno 发送通知的目标 endpoint。
          example: https://api.acme.com/yuno/webhooks
        api_key:
          type:
            - string
            - 'null'
          description: 以 `***` 掩码显示；如果您尚未配置，则为 `null`。
          example: '***'
        secret:
          type:
            - string
            - 'null'
          description: 以 `***` 掩码显示；如果您尚未配置，则为 `null`。
          example: '***'
        hmac_client_secret:
          type:
            - string
            - 'null'
          description: 以 `***` 掩码显示；如果您尚未配置，则为 `null`。
          example: '***'
        oauth2_authentication_url:
          type:
            - string
            - 'null'
          description: 您的令牌 endpoint。
          example: https://api.acme.com/oauth/token
        oauth2_client_secret:
          type:
            - string
            - 'null'
          description: 以 `***` 掩码显示；如果您尚未配置，则为 `null`。
          example: '***'
        oauth2_client_id:
          type:
            - string
            - 'null'
          description: Yuno 用于身份验证的客户端标识符。
          example: acme_client_id
        oauth2_grant_type:
          type:
            - string
            - 'null'
          description: Yuno 请求令牌时使用的授权类型。
          example: client_credentials
        oauth2_scope:
          type:
            - string
            - 'null'
          description: 请求令牌时使用的范围。
          example: webhooks:write
        oauth2_authorization_name:
          type:
            - string
            - 'null'
          description: Yuno 发送令牌所使用的标头。
          example: Authorization
        oauth2_include_client_id:
          type: boolean
          description: Yuno 是否同时在令牌请求中将客户端标识符作为标头发送。
          example: true
        enrollment_triggers:
          type:
            - array
            - 'null'
          description: webhook 订阅的注册事件。
          items:
            type: string
          example:
            - ENROLL
            - UNENROLL
        payment_triggers:
          type:
            - array
            - 'null'
          description: webhook 订阅的支付事件。
          items:
            type: string
          example:
            - AUTHORIZE
            - CAPTURE
            - REFUND
        report_triggers:
          type:
            - array
            - 'null'
          description: webhook 订阅的报告事件。
          items:
            type: string
          example:
            - UPDATE
        subscription_triggers:
          type:
            - array
            - 'null'
          description: webhook 订阅的订阅事件。
          items:
            type: string
          example:
            - CREATE
            - CLOSE_TO_RENEWAL
        onboarding_triggers:
          type:
            - array
            - 'null'
          description: webhook 订阅的 onboarding 事件。
          items:
            type: string
          example:
            - CREATED
            - SUCCEEDED
        renewal_days:
          type:
            - integer
            - 'null'
          description: Yuno 在续订前多少天发送 `CLOSE_TO_RENEWAL` 通知。
          example: 5
        created_at:
          type: string
          description: webhook 的创建日期和时间，采用 ISO 8601。
          example: '2026-07-09T13:05:36.482913Z'
          format: date-time
        updated_at:
          type: string
          description: webhook 的最近更新日期和时间，采用 ISO 8601。在您首次更新 webhook 之前，它与 `created_at` 相同。
          example: '2026-07-11T16:20:44.918330Z'
          format: date-time
    WebhookRequestError:
      type: object
      properties:
        code:
          type: string
          description: 机器可读的错误代码。
          enum:
            - WEBHOOK_INVALID_REQUEST
            - INVALID_ACCOUNT_ID
        messages:
          type: array
          description: 错误的可读描述。
          items:
            type: string
    WebhookAuthError:
      type: object
      properties:
        code:
          type: string
          description: 机器可读的错误代码。
          enum:
            - NOT_AUTHENTICATED
            - INVALID_CREDENTIALS
        messages:
          type: array
          description: 错误的可读描述。
          items:
            type: string
    WebhookUpstreamError:
      type: object
      properties:
        code:
          type: string
          description: 机器可读的错误代码。
          enum:
            - WEBHOOK_UPSTREAM_ERROR
        messages:
          type: array
          description: 错误的可读描述。
          items:
            type: string
  responses:
    InvalidListRequest:
      description: '`account_id` 缺失或无效，或者 `state` 不是 `ACTIVE` 或 `INACTIVE`。'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookRequestError'
          examples:
            Missing account_id:
              value:
                code: WEBHOOK_INVALID_REQUEST
                messages:
                  - account_id is required.
            Invalid state:
              value:
                code: WEBHOOK_INVALID_REQUEST
                messages:
                  - state must be ACTIVE or INACTIVE.
            Invalid account_id:
              value:
                code: INVALID_ACCOUNT_ID
                messages:
                  - Account id is invalid
    Unauthorized:
      description: 您的 API 凭证缺失或无效。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookAuthError'
          examples:
            Not authenticated:
              value:
                code: NOT_AUTHENTICATED
                messages:
                  - Not authenticated
            Invalid credentials:
              value:
                code: INVALID_CREDENTIALS
                messages:
                  - Invalid Credentials
    UpstreamError:
      description: webhook 服务暂时不可用。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookUpstreamError'
          examples:
            Service unavailable:
              value:
                code: WEBHOOK_UPSTREAM_ERROR
                messages:
                  - The webhook service is temporarily unavailable.
  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.