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

# Subscribe to trigger

> Subscribe to (or refresh) a trigger. Supplying the same (params, delivery.url) refreshes the TTL and may rotate the secret.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/smithery/openapi.documented.yml post /connect/{namespace}/{connectionId}/.triggers/{triggerName}
openapi: 3.1.0
info:
  title: Smithery Platform API
  description: >-
    API for the Smithery platform — discover, deploy, and manage MCP (Model
    Context Protocol) servers. Provides endpoints for browsing the server
    registry, managing deployments, creating scoped access tokens, and
    connecting to MCP servers.
  version: 1.0.0
servers:
  - url: https://api.smithery.ai
security:
  - bearerAuth: []
tags:
  - name: servers
    description: >-
      Browse the MCP server registry, manage server configuration, and handle
      deployments
  - name: skills
    description: Discover and search reusable prompt-based skills for MCP servers
  - name: tools
    description: Search for MCP tools across all registered servers
paths:
  /connect/{namespace}/{connectionId}/.triggers/{triggerName}:
    post:
      tags:
        - connect
      summary: Subscribe to trigger
      description: >-
        Subscribe to (or refresh) a trigger. Supplying the same (params,
        delivery.url) refreshes the TTL and may rotate the secret.
      operationId: postSmithery.run:namespace:connectionId.triggers:triggerName
      parameters:
        - schema:
            type: string
          in: path
          name: namespace
          required: true
        - schema:
            type: string
          in: path
          name: connectionId
          required: true
        - schema:
            type: string
          in: path
          name: triggerName
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTriggerRequest'
      responses:
        '200':
          description: Subscription created or refreshed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerSubscription'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: Connection or trigger not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateTriggerRequest:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/LooseObject'
          default: {}
          description: Trigger-specific parameters defined by the trigger inputSchema
        delivery:
          $ref: '#/components/schemas/TriggerDelivery'
      required:
        - params
        - delivery
      additionalProperties: false
    TriggerSubscription:
      type: object
      properties:
        id:
          type: string
          description: >-
            Stable subscription id derived from (namespace, connection, name,
            params, delivery.url). Used by the receiver to route via
            X-MCP-Subscription-Id.
          example: trg_01HW1234567890
        refreshBefore:
          type: string
          description: >-
            ISO 8601 timestamp at which the subscription expires unless
            refreshed.
          example: '2026-04-22T13:00:00.000Z'
      required:
        - id
        - refreshBefore
      additionalProperties: false
    ValidationError:
      type: object
      properties:
        error:
          type: string
          const: validation_error
        message:
          type: string
          example: Invalid request
      required:
        - error
        - message
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: string
          example: not_found
        message:
          type: string
          example: Resource not found
      required:
        - error
        - message
      additionalProperties: false
    LooseObject:
      type: object
      propertyNames:
        type: string
      additionalProperties:
        x-stainless-any: true
    TriggerDelivery:
      type: object
      properties:
        url:
          type: string
          description: >-
            HTTPS webhook destination where the upstream MCP server delivers
            events.
          example: https://my-app.example.com/events
        secret:
          type: string
          description: >-
            Standard Webhooks signing secret (whsec_<base64 of 24-64 random
            bytes>). The upstream MCP server signs each delivery with this.
          example: whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=
      required:
        - url
        - secret
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Smithery API key as Bearer token

````