OpenAPI 3.1.0MITraw.githubusercontent.com2026-08-132528872.0 MB

91fbe575ddf9

AI Webhooks

SWAIG function signature request

Sent once per SWAIG.includes entry when an AI agent loads, to discover the functions your server hosts. Every way of building an agent sends it — SWML you write yourself, SWML a Server SDK generates, or an agent you configure in your Dashboard — because they all resolve includes the same way. Return a JSON array of function definitions, each shaped like an entry in SWAIG.functionsfunction, description, and parameters. Functions the agent can call are the ones you return here.

This is not the payload a function call sends. It goes to the includes entry's url, using auth_user and auth_password when set. Your endpoint can also receive it outside of a call, as a check that it answers, so answer it the same way. When your project has a signing key, the request carries an X-SignalWire-Signature header you can verify.

postWebhookswaigSignatureRequest

Payload

actionstring required

What the request is asking of you. Always get_signature.

functionsstring[] required

The function names the includes entry asked for. This list can be empty, and it does not limit your reply: every definition you return is registered, whether or not it is named here.

meta_dataobject

The meta_data you set on the includes entry. Omitted when you set none.

meta_data_tokenstring

The token scoping meta_data. Present on the check your endpoint can receive outside of a call, where it is a fixed value with nothing to interpret, and absent during a call.

content_typestring required

The content type of the request body. Always text/swaig.

content_dispositionstring required

How the body is delivered. Always function signature request.

versionstring required

The SWAIG protocol version.

project_idstring

Your project ID, when available.

space_idstring

Your Space ID, when available.

Example payload

{
  "action": "get_signature",
  "functions": [
    "get_weather"
  ],
  "meta_data": {
    "store_id": "sf-01"
  },
  "meta_data_token": "my-token",
  "content_type": "text/swaig",
  "content_disposition": "function signature request",
  "version": "2.0",
  "project_id": "4d0d6f16-5881-4fcc-92a4-02c51a91954d",
  "space_id": "451ed9ff-e568-4222-8af9-4f9ab7428d09"
}

Response

Webhook received