---
title: "SWAIG function signature request"
method: POST
path: "swaigSignatureRequest"
tags: ["AI Webhooks"]
---

# SWAIG function signature request

`POST swaigSignatureRequest` (webhook)

Sent once per [`SWAIG.includes`](/docs/swml/reference/calling/ai/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.

Reply with the function definitions you host, each shaped like an entry in
[`SWAIG.functions`](/docs/swml/reference/calling/ai/swaig/functions#properties) — `function`,
`description`, and `parameters`. Three forms are accepted:

- an array of definitions, the usual one;
- a single definition on its own;
- an object `{functions, defaults}`, where `defaults` sets SWAIG defaults across the definitions
  it carries — useful when they share a `web_hook_url` or auth.

Every definition you return is registered, whether or not it was named in the request's
`functions` list.

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.

## Payload

- WebhooksAISwaigSignatureRequestPayload
  - `action` string, required — What the request is asking of you. Always `get_signature`.
  - `functions` string[], 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_data` object — The `meta_data` you set on the `includes` entry. Omitted when you set none.
  - `meta_data_token` string — 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_type` string, required — The content type of the request body. Always `text/swaig`.
  - `content_disposition` string, required — How the body is delivered. Always `function signature request`.
  - `version` string, required — The SWAIG protocol version.
  - `project_id` string — Your project ID, when available.
  - `space_id` string — Your Space ID, when available.

## Acknowledgement `200`

Webhook received

---

[API](https://skmtc.net/signalwire/apis/signalwire-rest-api.md) · [All operations](https://skmtc.net/signalwire/apis/signalwire-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/signalwire/signalwire-rest-api/revisions/a884f7dcbfc3/schema)
