Connect your agent
puertafria has an HTTP API, and its own MCP server over it. Your agent reads the queue, opens a company and records what happened, over HTTPS and never against the database. Same rows, same rules, second door.
Four steps
Mint a key
On your account page, under the subscription panel. A label saying where it will be used, and a box for whether it may write, off by default. The key is shown once and kept as a hash, so nobody reads it back. Connecting an agent is part of Pro. Go to your account.
Send it as a header
On every request, and nowhere else. Never a query parameter, which a log would keep. Never the session cookie: a signed-in browser must not reach this by accident.
Authorization: Bearer pf_...
Ask what you are holding
The first call names the account, the plan, and whether this key may write. An agent that reads that first never finds the limit by being refused.
curl -sS https://puertafria.es/api/v1/me \ -H "Authorization: Bearer $PUERTAFRIA_TOKEN"
Work the funnel
List the funnels, read the queue, open a company, write down what happened. Every call goes through the same function the screen goes through, so it meets the same refusals you do.
curl -sS https://puertafria.es/api/v1/funnels/$FUNNEL/queue \ -H "Authorization: Bearer $PUERTAFRIA_TOKEN"
Every door, and what is behind it
Paths, tool names and refusals stay English in both languages. A translated path is a wrong path.
Reads
GET /api/v1/me- The account this key opens, its plan, and whether this key may change anything. tool: whoami
GET /api/v1/funnels- Every funnel this account holds. Start here: nothing else takes a funnel by name. tool: list_funnels
GET /api/v1/funnels/:id- One funnel: counts by stage, how many are due, its campaigns and provinces, and its tracking fields with their ids. tool: funnel
GET /api/v1/funnels/:id/queue- Who to call today. Takes ?stage= &campaign= &province= &q= &page=. A company that asked to stop is never in it. tool: queue
GET /api/v1/companies/:id- One card: the row, its branches, its people, its history, its tracking values and its reminders. tool: company
GET /api/v1/funnels/:id/metrics- One funnel's numbers over ?days=7, 30 or 90. Pro and above; the free plan answers 403 PLAN_METRICS. tool: metrics
GET /api/v1/funnels/:id/export/:file- prospects.csv, contacts.csv or activities.csv. For curl and a pipe, never offered as a tool. no tool, on purpose
Writes, and each one needs a key that may write
POST /api/v1/companies/:id/activities- What happened on a call. An outcome that leaves the company open needs nextActionAt; a losing one needs a note. tool: record_outcome
PATCH /api/v1/companies/:id/tracking- The funnel's own fields on one company, keyed by field id. A blank clears a value; a field left out is left alone. tool: save_tracking
POST /api/v1/companies/:id/reminders- A promise to come back to this company on a day. Pro and above. tool: add_reminder
PATCH /api/v1/reminders/:id- Tick a reminder off, put it back, or move it. Exactly one of those per call. tool: update_reminder
PATCH /api/v1/companies/:id/branches/:locationId- One researched fact about one branch. A blank value clears it. tool: edit_branch_fact
POST /api/v1/funnels/:id/activate- Move named companies into a campaign. Ids only, never a filter: read the queue first and send what you looked at. tool: activate_cohort
POST /api/v1/funnels/:id/companies- One company typed in, for when there is no file. Bulk loading is the import screen, not this. tool: add_company
What it will refuse
- Nothing deletes. No route removes a company, a funnel, a field or a reminder. An agent that loops can make a mess you can read, never one that is gone.
- A no is forever. A company that asked to stop leaves every queue, and the server refuses another contact against it whoever is asking.
- An open outcome has to say when it is picked up again, and a losing one has to carry a note. The same rules the screen obeys.
- 500 write attempts per key per day. Attempts, not successes: a loop being refused is the loop worth stopping. Reads never spend.
- A key reads only unless you ticked the box, and you revoke it from the same panel. Revoking takes nothing back that it wrote.
The file to point your agent at
Everything on this page, plus the envelope, the refusal words and the rules behind them, in one plain-text address. That is what an agent should read, and it is the whole contract rather than a summary of one.
The MCP server
stdio, one process your agent host spawns, offering the same tools as the table above. It holds no logic: each tool is one request to those routes, so the remoteness is the API and not the shim, and a read-only key is offered read-only tools rather than left to find a 403 by calling something.
It is not published to a registry yet, so ask us for it. Nothing is lost by waiting: any agent that can make an HTTPS request already works the funnel today. Ask us for it.