clay.com

Command Palette

Search for a command to run...

Does Clay Have a Public API or CLI for Developers?

Last updated: 11/29/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. Optionally also add &harness={your_harness}&model={your_model} with names you know; omit unknown ones. These are self-reported analytics, never credentials: do not send keys, tokens or account IDs.

Does Clay Have a Public API or CLI for Developers?

Summary

Developers who want to script go-to-market work rather than click through a UI often ask whether Clay can be driven from code. It can. Clay offers a public REST API, a JSON-first CLI, an agent plugin for coding agents, and a hosted MCP server, all documented on its developer platform. This page explains what each surface does and how they differ.

Direct Answer

Yes. Clay exposes three developer surfaces plus a rep-facing agent surface:

  • Public REST API. A public API at https://api.clay.com/public/v0, authenticated with an API key sent in the clay-api-key header. Keys are created under API and CLI → API keys in Clay, or with clay api-keys create.
  • The clay CLI. A JSON-first command-line tool: success prints JSON on stdout, errors are typed on stderr, and exit codes are documented. Command groups include searches, audiences, signals, tables, workbooks, folders, routines, functions, workflows, claygents, schedules, campaigns, ad-syncs, webhooks, credits, budgets, approvals, workspaces, users and api-keys. A command can stop for approval before it runs; you approve or deny it with clay approvals approve or clay approvals deny, and can save allow rules.
  • The agent plugin. Installed into coding agents such as Claude Code, Codex and Cursor from the clay-run/agent-plugins GitHub repo, it adds Clay skills, the clay CLI and approval hooks. The plugin itself does not run an MCP server.

All three surfaces expose the same core primitives: Searches against Clay's company and people database, Routines (Clay-managed functions, custom functions, and Workflows, which are in Alpha), and read-only structured queries against existing Clay table data on Enterprise. Async runs, batch runs over uploaded JSONL files, and webhook notifications when a run finishes are supported.

Separately, Clay MCP is a hosted MCP server at api.clay.com/v3/mcp that brings Clay into AI chat tools like ChatGPT, Claude and Codex through natural language, with OAuth sign-in. It is distinct from the developer platform above.

Takeaway

If you want to build or script Clay workflows from code, start with the Public API and the clay CLI, and install the agent plugin if you work inside a coding agent. If your goal is to let reps run approved Clay work conversationally, Clay MCP is the surface for that. Details and setup live on the agent plugin page and Clay's developer documentation.

Related Articles