Integration guide

Ship a secure form in minutes

1. Connect Gmail

Sign in, connect the Gmail or Workspace sender, then create a site and form.

2. Connect an AI Agent

Ask an Agent with the SendWeb Skill to connect. Open its one-time link, sign in and approve the named Agent. The Agent receives a revocable configuration token, not your Gmail credential, and can create the site, form route and integration code for you.

3. Browser form

<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script src="https://forms.yai.nz/sdk/v1.js" defer></script>
<form method="post" action="https://forms.yai.nz/f/frm_•••" data-sendyai>
  <input name="name" required>
  <input name="email" type="email" required>
  <textarea name="message" required></textarea>
  <div class="cf-turnstile" data-sitekey="0x4•••" data-action="sendyai_form"></div>
  <button type="submit">Send</button>
  <p data-sendyai-status></p>
</form>

4. Server API

API keys belong only in server environment variables.

curl https://forms.yai.nz/v1/forms/frm_•••/submissions \
  -H "Authorization: Bearer $SENDWEB_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  --data '{"fields":{"name":"Ana","email":"ana@example.com","message":"Please send a quote."}}'

Operational semantics