{
  "opencollection": "1.0.0",
  "info": {
    "name": "Zavu Unified Messaging Layer 10DLC Functions API",
    "version": "0.2.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Functions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List function event types",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/event-types",
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List the event types a function trigger can subscribe to."
        },
        {
          "info": {
            "name": "List function triggers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/:functionId/triggers",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List function triggers"
        },
        {
          "info": {
            "name": "Create function triggers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.zavu.dev/v1/functions/:functionId/triggers",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Subscribe a function to one or more event types, optionally scoped to specific senders. Provide eventTypes and senderIds (use null in senderIds for all senders); a trigger is created for each event type and sender combination."
        },
        {
          "info": {
            "name": "Enable or disable a trigger",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.zavu.dev/v1/functions/triggers/:triggerId",
            "params": [
              {
                "name": "triggerId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Enable or disable a trigger"
        },
        {
          "info": {
            "name": "Delete a trigger",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.zavu.dev/v1/functions/triggers/:triggerId",
            "params": [
              {
                "name": "triggerId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Delete a trigger"
        },
        {
          "info": {
            "name": "List function deployments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/:functionId/deployments",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List a function's deployment history, newest first. Source code is omitted; fetch a single deployment via GET /v1/functions/deployments/{deploymentId} for full details."
        },
        {
          "info": {
            "name": "Roll back to a previous deployment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.zavu.dev/v1/functions/:functionId/rollback",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Re-deploy a previous version by copying its source, dependencies, and runtime pin onto the function's draft, then deploying. Returns immediately with a deployment ID — poll GET /v1/functions/deployments/{deploymentId} until status is active or failed. Secrets are not rolled back."
        },
        {
          "info": {
            "name": "Create function",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.zavu.dev/v1/functions",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Create a new Zavu Function. The function starts in `draft` status. A dedicated API key is auto-provisioned and injected as the `ZAVU_API_KEY` secret so the function can call back into the Zavu API without manual setup.\n\nProvide `sourceCode` to seed the draft. Call `POST /v1/functions/{functionId}/deploy` afterwards to publish."
        },
        {
          "info": {
            "name": "Get function",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/:functionId",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get function"
        },
        {
          "info": {
            "name": "Update function draft",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.zavu.dev/v1/functions/:functionId",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update the draft source code and/or dependency map without triggering a build. Visible in the dashboard immediately, but the live (deployed) function does not change until `POST /v1/functions/{functionId}/deploy` runs."
        },
        {
          "info": {
            "name": "Delete function",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.zavu.dev/v1/functions/:functionId",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Permanently delete a function and cascade: triggers, secrets, deployment history, managed agents+tools, and revoke the auto-provisioned API key. The AWS Lambda + log group are torn down asynchronously."
        },
        {
          "info": {
            "name": "Deploy function",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.zavu.dev/v1/functions/:functionId/deploy",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Publish the function. If `sourceCode` or `dependencies` are provided in the body, they replace the current draft before deployment. Returns immediately with a deployment ID — poll `GET /v1/functions/deployments/{deploymentId}` until status is `active` or `failed`."
        },
        {
          "info": {
            "name": "Get deployment",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/deployments/:deploymentId",
            "params": [
              {
                "name": "deploymentId",
                "value": "",
                "type": "path",
                "description": "Function deployment ID."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Fetch a deployment to poll its status during a deploy."
        },
        {
          "info": {
            "name": "List function secrets",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/:functionId/secrets",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Lists every secret key set on the function. Plaintext is NEVER returned — only the last 4 characters of each value, for visual confirmation."
        },
        {
          "info": {
            "name": "Set function secret",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.zavu.dev/v1/functions/:functionId/secrets/:key",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              },
              {
                "name": "key",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Create or update a secret on a function. Marks the function out-of-sync; the next `POST /deploy` re-publishes the Lambda with the new env. Keys must match `[A-Z_][A-Z0-9_]*` (uppercase env-var style) and cannot start with reserved prefixes (AWS_, LAMBDA_, etc)."
        },
        {
          "info": {
            "name": "Unset function secret",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.zavu.dev/v1/functions/:functionId/secrets/:key",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              },
              {
                "name": "key",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a secret from a function. Doesn't take effect on the running Lambda until the next deploy."
        },
        {
          "info": {
            "name": "Tail function logs",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.zavu.dev/v1/functions/:functionId/logs",
            "params": [
              {
                "name": "functionId",
                "value": "",
                "type": "path",
                "description": "Zavu Function ID."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "nextToken",
                "value": "",
                "type": "query"
              },
              {
                "name": "startTime",
                "value": "",
                "type": "query",
                "description": "Start of the log window in Unix epoch milliseconds."
              },
              {
                "name": "endTime",
                "value": "",
                "type": "query",
                "description": "End of the log window in Unix epoch milliseconds."
              },
              {
                "name": "filterPattern",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Fetch invocation logs for a function. Logs are paginated via `nextToken`. Pass `startTime` / `endTime` (Unix epoch milliseconds) to bound the window, or `filterPattern` to filter messages."
        }
      ]
    }
  ],
  "bundled": true
}