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

# Mint a webhook trigger

> Mint a webhook trigger on a schedule.


## OpenAPI

```yaml openapi.json post /v1/triggers/webhook
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.3.1
servers:
  - url: https://api.plungeai.com
paths:
  /v1/triggers/webhook:
    post:
      operationId: post-v1-triggers-webhook
      tags:
        - Triggers
      summary: Mint a webhook trigger on a schedule
      description: The response is never cached. A secret in it is shown once and cannot be read again.
      security:
        - ozkBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - schedule_id
              properties:
                schedule_id:
                  type: string
                prompt_template:
                  type: string
                  description: Text for the run’s input; {dotted.path} fills in a field of the JSON payload, e.g. {pull_request.title}
                scheme:
                  type: string
                  description: "Signature scheme: generic (default), github, gitlab or standard-webhooks"
                filters:
                  type: object
                  description: "{ all?: Rule[], any?: Rule[] } on the payload or headers; up to 20 rules"
                format:
                  type: string
                  enum:
                    - json
                    - yaml
                    - markdown
                    - text
                  description: Response format override (Accept header and the request Content-Type mirror also work). Default json.
          text/yaml:
            schema:
              type: string
      responses:
        "201":
          description: Minted Response format negotiates via the `format` field, an Accept header (application/json, text/yaml, text/markdown, text/plain), or the request Content-Type mirror; default JSON.
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  secret:
                    type: string
                    description: HMAC key for the sender; shown once
                  scheme:
                    type: string
                  url:
                    type: string
                    description: Where the sender POSTs
            text/yaml:
              schema:
                type: string
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
        "400":
          description: invalid_json / invalid_yaml / invalid_body — unreadable body; invalid_format — format must be one of json, yaml, markdown, text; invalid_request — the scheduler refused the settings (the message says which)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: unauthorized — missing, invalid or revoked ozk_ key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "schedule_not_found — no schedule with that id for this key (a foreign, missing or deleted id answers alike); not_found — no route for this method on this path: every other method answers it"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: invalid_params — a field is missing or malformed (the envelope names it); nothing was written
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "502":
          description: scheduler_error — the scheduler failed or did not answer; no detail is returned, retry
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
