PublicXDevelopers Open PublicX

Getting started

The PublicX API reads and changes your company's data in PublicX: open tenders, your pipeline of saved tenders, shared saved searches, documents and boards. It also tells you when something happens, through webhooks.

curl https://api.publicx.ai/v1/me \
  -H "Authorization: Bearer $PUBLICX_API_KEY"

GET /me answers with your company, plan, the key's scopes and its rate limits. It's a good first call.

API keys

Requests are made with a company API key, not a person's login.

Send the key in the Authorization header on every request:

GET /v1/tenders?q=limpeza&country=pt HTTP/1.1
Host: api.publicx.ai
Authorization: Bearer pxk_live_...

Never put a key in a URL. Session cookies from the PublicX app aren't accepted, and API keys don't sign in to the app.

Scopes

A key can do only what its scopes allow. When you create a key, you can grant only the scopes your own permissions and the company's plan allow. A plan change applies to existing keys at once: a downgraded company gets 403 with the code upgrade_required.

Scope What it allows Starter
tenders:read Search open tenders and read a tender Yes
saved:read Read your pipeline: saved tenders, stages and notes Yes
searches:read Read your company's shared saved searches. Private searches are never served. Yes
documents:read Read proposal documents and certificate expiry dates (metadata only, never their contents or files)
boards:read Read boards, columns and tasks
saved:write Save tenders, move them between stages, change notes, remove them Yes
boards:write Create board tasks
documents:write Create proposal documents
webhooks:write Manage the key's webhook endpoints Yes

Every key can call GET /me and GET /events.

Requests and responses

Errors

Errors are RFC 9457 problem details, served as application/problem+json. Branch on code, which stays stable, and show detail to people.

{
  "type": "https://developers.publicx.ai/errors/insufficient_scope",
  "title": "Forbidden",
  "status": 403,
  "detail": "This API key lacks the saved:write scope.",
  "instance": "req_7ZQ4M2K9T1",
  "code": "insufficient_scope"
}
Status When
400, 422 The request is malformed, or a field is invalid. errors lists the fields.
401 The key is missing, mistyped, expired or revoked.
403 The key lacks a scope, or the plan doesn't include the feature or the tender's country.
404 Nothing with that id is visible to your company.
409 A request with the same Idempotency-Key is still running.
429 A rate limit was reached. Wait for Retry-After.
503 PublicX is busy or under maintenance. Retry shortly.

Idempotency

Every write (POST, PUT, PATCH, DELETE) accepts an Idempotency-Key header, so a retry after a timeout can't do the same thing twice.

curl -X POST https://api.publicx.ai/v1/boards/$BOARD_ID/tasks \
  -H "Authorization: Bearer $PUBLICX_API_KEY" \
  -H "Idempotency-Key: 6b0f2c1e-task-ask-lot-2" \
  -H "Content-Type: application/json" \
  -d '{"title": "Ask about lot 2", "priority": "high"}'

Rate limits

Limits count only the requests that are let through.

Plan Per key, per minute Per company, per day Tender searches, per key, per minute
Starter 60 5,000 20
Pro, and trials 120 50,000 30
Enterprise 600 500,000 60

Webhooks

Webhooks send an HTTPS POST to your endpoint as soon as something happens: a new tender matches a shared search, a saved tender moves to another stage, a deadline is close, a task or document is created.

Zapier

The PublicX app for Zapier turns PublicX events into Zap triggers, and saves tenders and creates tasks and documents as Zap actions. It uses a company API key, like any other client.