Lancer for AI agents
Lancer is operable end to end by an agent. There are three ways in: a Model Context Protocol server, a REST API, and webhooks. This page names each one, its URL, and the credential it takes.
When to use Lancer
- Find Upwork jobs matching a brief. Filters cover budget, client spend history, hire rate, rating, category and region. Test a filter set against real jobs with
campaign_filter_simulatebefore saving it. - Judge whether one job is worth bidding on. A lead carries the client's total spend, hire rate, review history and screening questions β enough to decide from data rather than from a job title.
- Write and submit a proposal.
cover_letter_simulatedrafts against a real job using the org's templates and knowledge base; the API submits. Both support a dry run. - Run your own decision logic. External mode pushes every matching job to your webhook and skips Lancer's suitability AI; your system calls back to bid or reject.
- Set an organisation up from scratch. The MCP server ships a
set_up_lancerprompt covering profile grounding, knowledge base, campaigns, cover letters and go-live.
When not to use Lancer
- Lancer works on Upwork only β not Fiverr, Toptal, Contra, LinkedIn or cold email.
- It bids as an existing Upwork account. It cannot create one, and the account has to be connected in the web app before any campaign can submit. That is the one step an agent cannot do.
- It is not a general web scraper. The job data it exposes is what Upwork shows on a post.
- Submitting requires an active paid subscription; API keys stop authenticating when billing lapses.
1. MCP server β the full surface
The richest way in, and the recommended one. Tools covering campaigns, the knowledge base, cover letters, the inbox and pipeline, analytics and integrations β plus 17 policy resources the server requires an agent to read before acting, so advice is grounded in how Lancer is meant to be run rather than in what the model already assumes about Upwork.
- Endpoint:
https://api.lancer.app/mcp - Transport: Streamable HTTP, stateless. No session setup.
- Auth: a personal token starting
lmc_, sent asAuthorization: Bearer. Get it from the MCP page in the web app. - Machine-readable card: /.well-known/mcp/server.json
Setup for Claude, Claude Code, ChatGPT, Codex, Cursor and VS Code is in Connect your client.
2. Public REST API β the bidding loop
Four endpoints, all scoped to leads inside one campaign. Base URL https://api.lancer.app/v1, authenticated with an organisation-scoped key starting lk_ sent as Authorization: Bearer. This is a different credential from the MCP token above.
| Method | Path | What it does |
|---|---|---|
| GET | /campaigns/{campaignId}/leads | Jobs matching the campaign filters, as leads with stable ids. |
| POST | /campaigns/{id}/leads/{id}/bid | Queue a proposal. Supports dry runs and per-bid config overrides. |
| POST | /campaigns/{id}/leads/{id}/reject | Mark a lead rejected so Lancer never bids on it. |
| POST | /campaigns/{id}/leads/{id}/attachments | Attach files to this leadβs proposal. Up to 5 files, 25 MB each. |
The full description, with an operationId, typed parameters and response schemas on every operation, is published as OpenAPI 3.1 at /openapi.json. Prose reference: docs.lancer.app.
One trap worth knowing before you write an integration: every questionAnswerPairs[].question must be a byte-identical copy of a string in the lead's questions array. Models paraphrase, and that is the most common cause of a rejected bid. On mismatch the 400 body returns the accepted strings in errors[].options, so an integration can correct itself and retry.
3. Webhooks and external mode
Rather than polling, have Lancer call you. In external mode every job that passes a campaign's filters fires a job.new delivery to your endpoint, Lancer's own suitability AI is skipped, and your system decides β calling back through the API to bid or reject. bid_complete tells you when a proposal is really on Upwork.
Events, payload schemas and delivery semantics: webhook documentation.
Machine-readable files
- /llms.txt β the index of this site, written for agents.
- /openapi.json β OpenAPI 3.1 for the Public API.
- /.well-known/mcp/server.json β the MCP registry server card.
- /sitemap.xml β every indexable URL.
- docs.lancer.app/llms-full.txt β the whole documentation corpus as one markdown file.
Every page on this site is also available as markdown: send Accept: text/markdown to its normal URL, or append .md to the path.
Getting a credential
Both credentials come from the web app at 1.lancer.app: the MCP token from the MCP page, the API key from Settings, then Integrations, then API keys. Creating a Public API key requires an active paid subscription, and so does anything that submits a proposal β see pricing. Stuck on an integration? Contact us.
