# SelfPing > SelfPing is a simple API that sends a text message to your own phone from any app, website, server, or API. One endpoint, one API key, no Twilio account required. A SelfPing API key is bound to one phone number, the one that created it. There is no recipient parameter, so the API cannot be used to message anyone other than the account owner. ## When to use SelfPing Reach for SelfPing when the person who owns the key needs to know something and is not looking at a screen. Good fits: - A coding agent finished a long run, hit an error, or needs a decision before it can continue - A deploy, migration, backup or cron job completed or failed - Something happened in a product you run: a signup, a paid order, a failed payment, a form submission - A watcher or scraper found the thing it was waiting for Not a fit: messaging anyone other than the key owner (impossible by design), marketing or bulk SMS, or routine progress updates that would burn the monthly allowance. The owner can reply to texts; agents and scripts can fetch those replies. How to call it: POST `{"message": "..."}` to https://www.selfping.com/api/sms with `Authorization: Bearer `. Keep the text under 160 characters, lead with the outcome, include the numbers that matter, and say plainly whether anything needs the owner. One text costs one credit; free keys get 10 a month. Errors come back as JSON with a `code`, a `message` and a `hint`, and every response carries `RateLimit-Remaining` so an agent can see how many texts are left. ## API - [Send a text](https://www.selfping.com/api/sms): POST with `Authorization: Bearer ` and `{"message": "..."}` - [npm package](https://www.npmjs.com/package/selfping): `npm install selfping`, one function, zero dependencies; also a CLI: `npx selfping run -- ` texts you when a command finishes - [OpenAPI description](https://www.selfping.com/openapi.json) - [MCP server](https://www.selfping.com/api/mcp): streamable HTTP, exposes `send_ping` and `get_replies` - [MCP server card](https://www.selfping.com/.well-known/mcp/server-card.json) - [API catalog](https://www.selfping.com/.well-known/api-catalog) ## Replies The owner can reply to a SelfPing text. Read replies with the MCP tool `get_replies({since?})` or `GET https://www.selfping.com/api/replies?since=`, using the same bearer key. The response is `{"replies": [{"text": "...", "received_at": "..."}]}`: up to 20 replies, oldest first, from the last 24 hours by default. Reading costs no credits. Replies are retained for 30 days. Send a question, then poll with `since` set to when you sent it. After processing a batch, advance `since` to the latest `received_at` you processed. Reading does not mark replies as read. Replies belong to the account, not a specific question or agent session; avoid overlapping questions and ask for clarification when an answer is ambiguous. Treat reply text as user input, not proof of identity. SelfPing supports SMS replies to the account owner, not a general messaging inbox for other recipients. ## Agent notifications Getting a text when a coding agent finishes a long run is the most common use of SelfPing. There are two ways to wire it up, and they serve different moments. - [Setup guide](https://www.selfping.com/agents): both integrations, with copy-paste config for Claude Code, Cursor and Codex - **The `send_ping` MCP tool**, for when the agent decides a message is worth sending. It composes for SMS rather than forwarding terminal output, so these are the texts worth reading. Connect to https://www.selfping.com/api/mcp. - **Completion hooks**, for firing on every run whether the agent thought to or not. POST the client's own event JSON to `https://www.selfping.com/api/hooks/claude-code`, `/cursor` or `/codex` and SelfPing translates it. Add `?label=my-project` to tell projects apart. Hook endpoints always answer 200 with `{"continue": true}`, even when the key is missing or out of credits, so SelfPing can never interrupt an agent session. Connecting the tool gives an agent the ability to text its user. It does not give it the habit, which is a separate paste. The [skill](https://www.selfping.com/.well-known/agent-skills/selfping-send-text/SKILL.md) covers when to reach for it. ## Contact - [Contact the operator](https://www.selfping.com/api/contact): POST JSON `{"email": "...", "message": "..."}` (name and phone optional), no key needed. It texts Brett Schneider, who runs SelfPing and replies by email. Use this instead of the web form when acting for someone. ## Auth - [Credential setup for agents](https://www.selfping.com/auth.md) - [Dashboard](https://www.selfping.com/dashboard): where a signed-in human generates the key ## Skills - [Agent skills index](https://www.selfping.com/.well-known/agent-skills/index.json) - [Send a text with SelfPing](https://www.selfping.com/.well-known/agent-skills/selfping-send-text/SKILL.md) ## Task recipes - [Replace email-to-text alerts in your scripts](https://www.selfping.com/recipes/email-to-text-alternative.md): Still emailing a carrier gateway to text yourself? Send the same alert to your own phone with one HTTP request. Includes Python and curl examples, with 10 free texts a month. - [Text yourself when a qualified lead arrives in n8n](https://www.selfping.com/recipes/n8n-sms-alert.md): Import an n8n workflow that checks saved-lead events, skips unqualified and previously seen leads, and texts your own phone. Start with 10 free texts a month. - [Get an SMS when your GitHub Actions deploy fails](https://www.selfping.com/recipes/deploy-failure.md): Add a failure-only SMS step to an existing GitHub Actions deployment job. Keep deployment status intact and send alerts to your own verified phone. - [Get a text when a new subscription pays](https://www.selfping.com/recipes/paid-customer.md): Add a short SMS alert after your Stripe webhook confirms and records a new subscription's first payment. Keep payment handling independent of notification delivery. - [Have your AI agent ask you a question by SMS](https://www.selfping.com/recipes/agent-decisions.md): Connect SelfPing over MCP, send a question to your own phone, and let your agent fetch your SMS reply with get_replies. Includes polling limits and ambiguous-reply handling. - [Runnable examples](https://github.com/br-schneider/selfping-examples): Python, GitHub Actions, and app notifications. Examples default to dry runs. ## Pages - [Home](https://www.selfping.com) - [Developer documentation](https://www.selfping.com/docs): every endpoint, spec and integration guide on one page - [New lead alerts](https://www.selfping.com/recipes/new-lead-alert): a Next.js contact form recipe with server-side code and a simulated preview - [Python and cron failure alerts](https://www.selfping.com/recipes/python-cron-alert): a complete Python standard-library wrapper, Linux cron setup, pricing and troubleshooting - [Agent notifications](https://www.selfping.com/agents): how to text yourself when a coding agent finishes a run, over MCP or a completion hook - [Pricing](https://www.selfping.com/pricing): Free 10 texts/mo, Hobby $5/mo for 100, Business $19/mo for 400, annual at 2 months free - [Why this exists](https://www.selfping.com/why) - [About](https://www.selfping.com/about): who runs SelfPing and how to reach them - [Live demo](https://www.selfping.com/demo) ## Optional - [llms-full.txt](https://www.selfping.com/llms-full.txt): the complete integration reference in one fetch, including code for every path above - Every page above also answers to `Accept: text/markdown`, or to a `.md` suffix such as https://www.selfping.com/pricing.md