Skip to content

Let your agent set it up

You don't have to read our API docs, and neither does your AI tool. Start a line, pick the tool you build with, copy one prompt into it, and watch the wizard turn green when your agent has connected itself.

Set it up

Paste it into your tool. Your agent builds and connects everything itself, and this box turns green when it's done.

Or: already running? Paste its URL

Doing it by hand

It works with Lovable, Bolt, Replit, v0, Cursor, Claude, ChatGPT, Tasklet, n8n, and anything else that can write and deploy a little code.

How it works

  1. Start the connect wizard, name your line and pick a number.
  2. At "Where's your agent?", choose Let your agent set it up and pick your tool.
  3. Copy the prompt and paste it into your tool's chat.
  4. Your agent builds an endpoint (a URL that answers our POST with plain text), deploys it, and connects it:
    • tools that can make web requests (Cursor, Replit, Claude Code, Tasklet) call Silver Arrows themselves. We send the endpoint a test text and answer with the result in plain English, so the agent can fix problems on its own. The wizard turns green by itself: "Your agent connected — reply received in 1.2 s".
    • tools that can't (Lovable, Bolt, v0, a chat without tools) end their reply with one line starting ARROW_SETUP. Paste the agent's reply into the box under the prompt; we find that line, connect it and run the same test.
  5. Get your number and share it.

Unless you untick Link texters to user accounts in my app, the prompt also has your agent connect texters to your app's own user accounts with phone login. If your app has no sign-up and login yet, the agent adds the simplest one its platform offers (Supabase Auth on Lovable). It then adds a "Connect your phone" button to the account page, and every text from a connected phone reaches your agent with that user's account_id. Texters without an account can still text: the agent answers them and links to sign-up when an answer needs an account. Tasklet and n8n have no website for users to log in to, so their prompts leave this out.

The prompt is tailored to your tool. For Lovable it asks for a Supabase edge function with verify_jwt = false; for n8n, a Webhook node and a Respond to Webhook node; for Tasklet, a webhook trigger that answers through our reply endpoint.

Already have a line? Open it and use Connect to move it to a new endpoint. Its current connection keeps working until the new one passes its test.

What's in the prompt

  • your line's name, keyword and number,
  • what we POST for every text and how to answer (plain text within 10 seconds, or later through the reply endpoint),
  • the optional signature check,
  • the rules for custom texter messages (the opt-in, HELP and STOP texts must keep a few words carriers require),
  • user accounts, unless you opted out: sign-up and login if the app has none, a "Connect your phone" button that uses phone login, and how to read account_id,
  • a setup key (arrow_setup_…), and how to finish: connect with it, or print the ARROW_SETUP line,
  • an instruction never to invent a URL, and to tell you in plain English what it built and whether the test passed.

The setup key

The key in the prompt is not an API key. It can do one thing: set up this one line.

  • It works for 60 minutes. Regenerate key gives you a new one and switches the old one off.
  • It stops working as soon as the line is live (or if you delete the line).
  • It can only call GET and POST /v1/setup. Every other endpoint refuses it, so it can't read your conversations, send texts or touch other lines.
  • We store only a hash of it.

GET /v1/setup gives the agent the line's whole contract as JSON, including the line's webhook secret, so its endpoint can check our signature. That's the one secret it returns. It's fine to hand over because the key is yours, short-lived and limited to this line, and the endpoint needs that secret anyway. Your agent should keep it server-side. You can rotate it from the dashboard any time.

For agents: the API

# Everything about the line, as JSON (what we send, how to answer, the signature check and secret, message rules).
curl -s https://silverarrows.dev/v1/setup -H "Authorization: Bearer $SA_SETUP"

# Connect the endpoint you deployed and run the live test.
curl -s -X POST https://silverarrows.dev/v1/setup \
  -H "Authorization: Bearer $SA_SETUP" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://my-app.example/api/sms", "mode": "webhook"}'

The POST body:

Field
url Required. The public URL of the endpoint you deployed. Placeholder URLs are refused.
mode webhook (default: answer with plain text) or relay (the strict, signed {"reply"} contract).
messages Optional texter messages, as in Customize what texters see. A plain string is shorthand for {"mode": "text", "text": "…"}; null keeps our default. Messages missing what carriers require are refused with a 400 that names what's missing, and nothing changes.
name Optional. Renames the line.
phone_login Optional. true when the app links texters to its user accounts. Setup first sends your endpoint a request signed with the wrong secret, carrying a fake account_id, and fails if the endpoint answers it with a 2xx: it must check X-Arrow-Signature. A passing setup then returns a line key that can make login codes.

The answer is 200 whether or not the test passed:

{
  "ok": false,
  "line": { "id": "line_8Hq2kVd0sPZx1mLw4TfR", "keyword": "MISSIONBIKES", "number": "+14155550100", "live": false },
  "test": {
    "reply": null,
    "latency_ms": 212,
    "error": "Your endpoint returned 401.",
    "hint": "Supabase rejected the request before your function ran: set verify_jwt = false for the function in supabase/config.toml, redeploy, then call again.",
    "warnings": []
  },
  "messages_set": [],
  "kept_previous_connection": false,
  "next_steps": ["…", "Nothing is live yet. Fix it, redeploy, and call POST /v1/setup again with the same token."]
}

With "ok": true the line is live and the key is retired. On a line that was already live, a failing endpoint leaves the old connection in place (kept_previous_connection: true).

The line key

Two kinds of setup need a key afterwards: an endpoint that passes the test by answering with nothing (Tasklet, a slow n8n workflow) has to send each answer later through POST /v1/lines/:id/reply, and an app with user accounts ("phone_login": true) has to make login codes through POST /v1/lines/:id/login_codes. So the successful answer also includes a key, shown once:

{
  "ok": true,
  "api_key": {
    "key": "arrow_live_…",
    "line_id": "line_8Hq2kVd0sPZx1mLw4TfR",
    "store_as": "ARROW_API_KEY",
    "can": "POST /v1/lines/line_8Hq2kVd0sPZx1mLw4TfR/reply, /send, /request_schedule_consent and /login_codes; GET …/schedule_consents, …/login_codes/:code_id and …/logins; DELETE …/logins/:sender_id. Nothing else, and no other line."
  }
}

The agent saves it as a secret named ARROW_API_KEY. You never copy a key yourself: copying the prompt while signed in is your approval.

  • It only works for this one line: replying, scheduled sends, asking for schedule consent, and phone login (login codes, listing logins, logging a phone out). Every other endpoint, and every other line, refuses it with 403 line_key_scope.
  • Running setup again replaces it, and the old one stops working.
  • It shows up under Account → API keys as "<line> only · from agent setup", where you can revoke it.
  • If you connected with the paste-back line and turned on user accounts, the wizard shows you the key once, to add to your app's secrets as ARROW_API_KEY (Lovable: Supabase secrets; Bolt and v0: environment variables).
  • If the agent can't store secrets, it can ask you to create a full key at /account instead.

Limits: 30 setup attempts and 120 lookups an hour per key; each attempt also counts as a connection test.

Errors use the usual envelope. Codes you may see: setup_token_expired, setup_token_revoked (a newer key exists), setup_token_used (the line is already live), setup_token_invalid, setup_token_required (an API key was sent instead), and setup_token_scope (a setup key sent to any other endpoint).

The paste-back line

Tools that can't make web requests end with exactly one line:

ARROW_SETUP {"url": "https://abcd1234.supabase.co/functions/v1/sms-reply", "mode": "webhook"}

It takes the same fields as POST /v1/setup. Paste the agent's whole reply: we find the line even inside code blocks, with smart quotes or a trailing comma, and we refuse placeholder URLs like <your-project-ref>.

If it doesn't connect

The panel shows what the test saw and what to do. The usual ones:

  • 404 or 405: the endpoint isn't deployed, or the URL's path is wrong. Ask your tool for the deployed URL, not the preview.
  • 401 from Supabase: the function needs verify_jwt = false.
  • Took longer than 10 seconds: answer straight away with nothing, then reply within 5 minutes through POST /v1/lines/:id/reply (with the line key setup gives the agent, above). See Async and scheduled.
  • A web page came back: that's the site's URL, not the endpoint's.
  • Answered a request with a wrong X-Arrow-Signature (user accounts on): the endpoint doesn't check our signature, so anyone who found its URL could pretend to be any of your users. Ask your agent to verify X-Arrow-Signature and answer 401 when it doesn't match.

Prefer to do it by hand? Everything the prompt asks for is in Webhook.