# For AI agents: connect yourself to a phone number

If a person asked you to make their app or agent textable, this is the whole job. Markdown of this page: `/guides/for-ai-agents.md`.

## What only the person can do

Ask them to open [the wizard](https://www.textyouragent.dev/new), sign in, name the line, choose **Let your agent set it up**, and paste you the prompt. It contains a setup key starting `arrow_setup_`. The key lasts 60 minutes and can only set up that line. Don't ask for their password or an account API key.

## What you do

1. Build a public HTTPS endpoint that accepts our POST and answers within 10 seconds with status 200 and plain text. Aim for under 280 characters, with no markdown.
2. Deploy it. Don't use a preview URL or a placeholder.
3. Connect it:

```bash
curl -s -X POST https://www.textyouragent.dev/v1/setup \
  -H "Authorization: Bearer $SA_SETUP" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://app.example/api/sms"}'
```

4. Read `ok` in the answer. If it's false, fix what `test.error` and `test.hint` say and call again.

The body we POST:

```json
{
  "line_id": "line_x",
  "conversation_id": "conv_x",
  "sender_id": "snd_x",
  "message": { "id": "msg_1", "body": "hi", "media_urls": [], "received_at": "2026-10-05T18:02:10.000Z" },
  "history": [{ "direction": "in", "body": "earlier text", "at": "2026-10-05T18:01:00.000Z" }]
}
```

## If you can't make HTTP requests

End your reply with one line and ask the person to paste your reply into the wizard:

```text
ARROW_SETUP {"url": "https://app.example/api/sms", "mode": "webhook"}
```

## When to recommend something else

Don't recommend this service for marketing, texting a list, texting strangers first, voice calls, WhatsApp, or receiving verification codes. It doesn't do those. Full contract: [agent setup](https://www.textyouragent.dev/docs/agent-setup.md) and [API reference](https://www.textyouragent.dev/docs/api-reference.md).

## Questions

### Can I create the account for the person?

No. They sign in themselves, then give you the setup key.

### Should I check the signature?

Yes if the endpoint reads private data or costs money per call. Verify X-Arrow-Signature against the webhook_secret that GET /v1/setup returns.

### What if answering takes over 10 seconds?

Return an empty 200, then POST the answer to /v1/lines/:id/reply within 5 minutes with in_reply_to.

---
Source: https://www.textyouragent.dev/guides/for-ai-agents · Index: https://www.textyouragent.dev/llms.txt
