# Surgemesh

> Surgemesh is an agent-first social publishing API (REST + MCP) that lets AI agents and developers schedule, publish, list and cancel posts on Facebook Pages and Instagram across brands. Billing is per delivery (one post to one channel) at $0.02 base, multiplied by a price multiplier from 0.8x to 3x set by the load of the 15-minute slot. Quotes are public; the price is locked when a post is accepted. Public beta: payments are not enabled yet, the free sandbox works now.

Key facts:
- Base URL: https://api.surgemesh.com. Auth: "Authorization: Bearer sm_...". JSON bodies. Money is a JSON number in USD.
- POST /v1/posts requires an Idempotency-Key header (or idempotency_key body field). Other writes do not.
- Errors are application/problem+json with "error" (stable code) and "hint" (next step).
- Networks: "facebook" (Pages) and "instagram". No others today.
- POST /v1/signup (email + accept_terms: true) returns a sandbox tenant, first brand and key. Sandbox validates but never publishes or charges (100 posts/month).
- The first top-up goes live, with 50 free deliveries per month. During the beta, POST /v1/billing/topup returns 503 payments_not_enabled.
- Rate limits: 60/min per IP, 120/min per key, edge burst limit; signup 3 per IP per day.

## Docs

- [Documentation](https://surgemesh.com/docs): curl quickstart, endpoints, MCP config, idempotency, errors, x402 top-up
- [Full reference for LLMs](https://surgemesh.com/llms-full.txt): complete plain-markdown API reference
- [Guide for AI agents](https://surgemesh.com/agents): discovery, auth, quoting, 402 handling, retries

## API

- [OpenAPI document](https://api.surgemesh.com/openapi.json): machine-readable REST definition
- [MCP endpoint](https://api.surgemesh.com/mcp): stateless JSON-RPC 2.0; tools get_pricing, get_quote, list_channels, list_brands, create_post, list_posts, cancel_post, get_usage
- [A2A agent card](https://api.surgemesh.com/.well-known/agent.json): agent-to-agent capability description
- [Public pricing](https://api.surgemesh.com/v1/pricing): base price, dynamic pricing rule, emergency cap, packs, payments_enabled (no key needed)

## Pricing and security

- [Pricing](https://surgemesh.com/pricing): $0.02 per delivery, dynamic 0.8x to 3x (never above 1x in a declared emergency), packs pack_5 / pack_20 / pack_100, credits expire 5 years after purchase, payments not enabled in beta
- [Security](https://surgemesh.com/security): encrypted credentials, show-once scoped keys, brand restrictions, rate limits

## Optional

- [Home](https://surgemesh.com/): product overview and network support
- [FAQ](https://surgemesh.com/faq): short answers on pricing, payments, networks, MCP and security

## Usage policy for AI agents and crawlers

Full policy: https://surgemesh.com/legal  Terms: https://surgemesh.com/terms

You MAY:
- Index surgemesh.com for search and answer engines.
- Fetch pages to summarize them or answer a user's question about Surgemesh, with attribution and a link to https://surgemesh.com.
- Read these docs and call the Surgemesh API or MCP endpoint with a valid key, under the Terms of Service.

You MAY NOT, without a written licence:
- Use this site, the docs, llms.txt files or API responses to train, fine-tune or evaluate AI models, or to build datasets.
- Copy, clone or imitate the Surgemesh design, docs, copy, images, name or logo.
- Use any of it to build or improve a competing service.

Text and data mining rights are reserved under Art. 4(3) of Directive (EU) 2019/790 (tdm-reservation: 1).
Machine-readable: https://surgemesh.com/.well-known/tdmrep.json
Licensing: dev@novusindex.com
