Public API
Who this is for: If you’re not building an integration, you can skip this section. Everything here is public product documentation.
What it is
Section titled “What it is”The Public API lets you:
- List your pages and smart links
- Create pages and smart links programmatically, optionally with initial links and socials
- Update a page’s metadata and appearance: title, note, publish state, description, colors, button style, direct-link/chatbot/Meta Pixel settings
- Manage a page’s content one item at a time: add, update or remove individual links, image cards, named sections and social links
- Update a smart link’s metadata, and its conditional-redirect flow itself; duplicate one
- Fetch analytics summaries for a page or a smart link by its slug
- Check whether a handle is available before creating
You authenticate with an API key generated in the dashboard.
Base URL
Section titled “Base URL”All endpoints live under:
https://onlynk.me/api/public/
Machine-readable spec
Section titled “Machine-readable spec”An OpenAPI 3.1 document describing every endpoint is served at:
https://onlynk.me/api/public/openapi.json
Point your API client, SDK generator or AI agent at it.
MCP server
Section titled “MCP server”For AI agents (Claude, ChatGPT, Cursor, …), OnLynk also exposes the same capabilities as an MCP server over Streamable HTTP:
https://onlynk.me/api/mcp/mcp
Authenticate the same way, with your API key as a bearer token, or, for MCP clients (like Claude.ai’s custom-connector setup) that only accept a plain server URL and can’t set custom headers, pass the key as an ?apiKey= query parameter instead (see Authentication). Tools cover the full REST surface: pages and their content (links, cards, sections, socials), smart links, analytics, and slug availability. Each tool is a thin wrapper over the REST endpoint of the same name, so behavior and error codes match this reference exactly.
Next steps
Section titled “Next steps”- Authentication: API keys and how to send them
- Endpoints reference: request/response examples