UNICORN CONTRACTS your online tender office

Unicorn Contracts API

Unicorn Contracts, your online tender office: every day it finds the open public tenders that suit your company and prepares the turnkey bid, ready to sign, within 48 hours.

REST API over HTTPS with JSON. It returns the open public tenders matched to your company profile and sends alerts to your own tools (CRM, spreadsheets, Make, Zapier). The OpenAPI 3.1 specification is at /openapi.json.

Read only: the API does not request turnkey bids or start any paid action. To have a bid prepared, open the tender's bidUrl in the dashboard.

Authentication · Limits · Errors · Tenders · Profile · Webhooks · Integrations

Authentication

An admin of your account creates keys in the dashboard (Access tab, "API and integrations"). Keys start with ct_live_, are shown once and stored only as a SHA-256 hash. Several named keys can be active; revoke each one separately.

curl https://contracts.unicornprivate.com/v1/me -H "Authorization: Bearer ct_live_..."

Limits

300 requests per minute per account. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix time); over the limit the answer is 429 too_many_requests with Retry-After in seconds. Lists return up to 100 items per page.

Errors

Errors use HTTP status codes and a JSON body:

{"error": {"code": "invalid_parameter", "message": "sort must be one of score, deadline, matched, published.", "status": 400, "docs": "https://contracts.unicornprivate.com/docs#errors"}}
StatusCodes
400invalid_json, invalid_parameter, invalid_url
401invalid_api_key
404not_found
405method_not_allowed
409too_many_endpoints
413payload_too_large
429too_many_requests
500server_error (retry later)

Tenders

GET /v1/tenders lists the open tenders matched to your profile (deadline in the future). Filters: q (title or buyer), country (IT,DE), cpv (code or prefix), minScore (0-100), minValue, maxValue, deadlineAfter, deadlineBefore, matchedSince (ISO 8601). Order with sort = score (default), deadline, matched, published. Pages with limit (1-100, default 25) and offset; meta.total and meta.hasMore tell if there are more.

curl "https://contracts.unicornprivate.com/v1/tenders?country=IT&minScore=60&sort=deadline&limit=10" -H "Authorization: Bearer ct_live_..."
{
  "data": [
    {
      "id": "ted:712345-2026",
      "title": "Cleaning services for municipal offices",
      "buyer": "Comune di Milano",
      "country": "IT",
      "buyerCountry": "IT",
      "description": null,
      "cpv": [
        "90910000"
      ],
      "value": 120000,
      "currency": "EUR",
      "publishedAt": "2026-11-12T00:00:00Z",
      "deadline": "2026-12-10T12:00:00+01:00",
      "procedure": "open",
      "awardCriteria": "mixed",
      "status": "open",
      "noticeUrl": "https://ted.europa.eu/en/notice/-/detail/712345-2026",
      "documentsUrl": null,
      "lots": [],
      "matched": true,
      "score": 87,
      "matchedAt": "2026-11-18T06:10:00.000Z",
      "pageUrl": "https://contracts.unicornprivate.com/tenders/cleaning-services-for-municipal-offices-abcdefghij/",
      "bidUrl": "https://contracts.unicornprivate.com/dashboard?tender=abcdefghij"
    }
  ],
  "meta": {
    "total": 42,
    "limit": 25,
    "offset": 0,
    "count": 1,
    "hasMore": true
  }
}

GET /v1/tenders/{id} returns one tender. The id contains a colon: URL-encode it (ted%3A712345-2026). Tenders not matched to your profile are returned with matched: false and score: null.

score is the relevance of the tender to your profile (sector, area, size), not a chance of winning. Data comes from the official notices; check the notice (noticeUrl) before deciding.

Profile

GET /v1/profile returns the profile used for matching: CPV codes, keywords, countries, region and reach, size, certifications. Change it in the dashboard (Company profile tab); matches are recalculated within the next cycle (about 10 minutes).

GET /v1/me returns the organization, the key in use and the rate limit: use it to test a connection.

Webhooks

Create an endpoint with POST /v1/webhooks (up to 10 per account, public HTTPS URL on port 443). The response contains the signing secret once and a Location header; delete with DELETE /v1/webhooks/{id}, send a test event with POST /v1/webhooks/{id}/test.

curl -X POST https://contracts.unicornprivate.com/v1/webhooks -H "Authorization: Bearer ct_live_..." -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/tenders", "types": ["tender.matched", "tender.deadline"], "deadlineDays": 7}'
EventWhen
tender.matchedA new open tender is matched to your profile (only tenders matched after the endpoint was created).
tender.deadlineA matched open tender closes within deadlineDays days (default 7, 1-30). Once per tender and deadline; a new event if the deadline changes.

Events are checked every 10 minutes. Body: {"id", "type", "created", "data"}, where data is the tender (same fields as GET /v1/tenders, plus daysLeft for tender.deadline). The event id is stable: use it to ignore duplicates.

Signature. Header Unicorn-Contracts-Signature: t=<unix>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<raw body> with the endpoint secret. Reject events older than 5 minutes. Header Unicorn-Contracts-Event-Id repeats the id.

// Node.js: verify Unicorn-Contracts-Signature on the raw body
const crypto = require('crypto');
function verify(secret, rawBody, header) {
  const p = Object.fromEntries(header.split(',').map(x => x.split('=')));
  if (Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false;
  const mac = crypto.createHmac('sha256', secret).update(p.t + '.' + rawBody).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(p.v1 || ''));
}

Retries. Any 2xx acknowledges the event. Otherwise it is retried after 1, 5, 30, 120, 360, 720, 1440 minutes (at the next 10-minute cycle), 8 attempts in all, then marked failed. Redirects are not followed.

Integrations

Make and Zapier apps use the same API key: instant triggers "Watch new matching tenders" and "Watch tender deadlines", searches "Search tenders" and "Get a tender", and a universal API call. For any other tool, use the webhooks above or poll GET /v1/tenders?matchedSince=....

HubSpot: the Public tenders card on company records, see the HubSpot setup guide.