# 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, two-way conversations, or routine progress updates that would burn the monthly allowance.

How to call it: POST `{"message": "..."}` to https://www.selfping.com/api/sms with `Authorization: Bearer <key>`. 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 <key>` and `{"message": "..."}`
- [npm package](https://www.npmjs.com/package/selfping): `npm install selfping`, one function, zero dependencies; also a CLI: `npx selfping run -- <command>` 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 the `send_ping` tool
- [MCP server card](https://www.selfping.com/.well-known/mcp/server-card.json)
- [API catalog](https://www.selfping.com/.well-known/api-catalog)

## 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)

## 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
- [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
