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.
- Base URL:
https://api.publicx.ai/v1 - Reference: every endpoint, parameter and field is in the API reference. The same description is in
openapi.json(OpenAPI 3.1), for code generators and API clients. - Try it:
api.publicx.ai/v1/docssends real requests with your key. - No code: the PublicX app for Zapier connects PublicX to thousands of other apps.
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.
- Where: in PublicX, Settings > API keys. Members with the Manage integrations permission create them.
- Which plans: Pro and Enterprise, and trials, can use every scope. Starter can use the scopes marked below. Free has no API access.
- Format:
pxk_live_followed by 49 letters and digits. The last 6 are a checksum, so a mistyped key is refused at once. - Shown once: PublicX stores only a hash of the key. Copy it when it's created, and keep it in a secret store, not in code.
- Expiry: never, or after 30, 90 or 365 days.
- Roll a key to replace it. The old key keeps working for the grace period you choose (none, 1 hour, 24 hours or 7 days), and its webhook endpoints move to the new key.
- Revoke a key to stop it at once. Its webhook endpoints are paused.
- Up to 25 active keys per company. The list shows when each key was last used, and by which kind of client.
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
- JSON in and out, in UTF-8. Times are UTC, in RFC 3339 (
2026-12-15T17:00:00Z). - Deadlines:
deadline_atis the UTC instant.deadline_localgives the date and time zone as the buyer published them, anddate_onlyis true when no time was given. - Every response carries an
X-Request-Id(req_...). Quote it when you contact support. - Lists return
data,has_moreandnext_cursor. Passcursor=<next_cursor>for the next page, with up tolimit=100items a page (50 by default).- Incremental sync: most lists accept
updated_since. - Tender search pages within its first 1,000 results. A search cursor works only with the query it came from.
- Incremental sync: most lists accept
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"}'
- Use a new unique value for each operation, such as a UUID, at most 255 characters. Reuse it only to retry that same request.
- The first answer is kept for 24 hours, for each API key. A retry with the same key and body gets that answer again, with the header
Idempotent-Replayed: true. - The same key with a different body gets
422with the codeidempotency_key_reused. - A retry while the first request is still running gets
409. Wait and retry. - A
5xxanswer isn't kept, so you can retry with the same key.
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 |
- Every response says where you stand, in the
RateLimit-PolicyandRateLimitheaders (IETF draft). - Over a limit, you get
429withRetry-After, in seconds. - For changes, prefer webhooks to polling.
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.
- Set them up in PublicX under Settings > Webhooks, or with the API's
/webhook-endpoints, which needswebhooks:write. - Signed: each request is signed following Standard Webhooks, with the endpoint's own
whsec_secret. - Read Webhooks for the payload, the event types, how to verify a signature, and the retry rules.
- Polling instead:
GET /eventslists the last 30 days of events your key may see, newest first, in the same envelope. It's kept for companies with awebhooks:writekey.
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.