{
  "components": {
    "schemas": {
      "Board": {
        "additionalProperties": false,
        "properties": {
          "app_url": {
            "type": "string"
          },
          "assignee_ids": {
            "description": "Member ids.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "connected_tender_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "groups": {
            "description": "Only on a single board.",
            "items": {
              "$ref": "#/components/schemas/BoardGroup"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "connected_tender_id",
          "assignee_ids",
          "app_url",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "BoardGroup": {
        "additionalProperties": false,
        "properties": {
          "color": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "position"
        ],
        "type": "object"
      },
      "BoardPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Board"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "Certificate": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "file_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "category",
          "file_name",
          "content_type",
          "size_bytes",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "CertificatePage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Certificate"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "CreateDocumentBody": {
        "additionalProperties": false,
        "properties": {
          "content_html": {
            "description": "The document's body as HTML; scripts, styles and unsafe links are removed.",
            "maxLength": 1000000,
            "type": "string"
          },
          "task_id": {
            "description": "A board task without a document yet; the document takes its tender too.",
            "format": "uuid",
            "type": "string"
          },
          "tender_id": {
            "format": "uuid",
            "type": "string"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "type": "object"
      },
      "CreateHookBody": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 200,
            "type": "string"
          },
          "event_types": {
            "description": "Event types, or * for every type the key may see.",
            "items": {
              "type": "string"
            },
            "maxItems": 25,
            "minItems": 1,
            "type": [
              "array",
              "null"
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "source": {
            "description": "Who subscribes; shown in the app.",
            "enum": [
              "api",
              "zapier",
              "make",
              "n8n"
            ],
            "type": "string"
          },
          "url": {
            "description": "A public HTTPS address.",
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "url",
          "event_types"
        ],
        "type": "object"
      },
      "CreateTaskBody": {
        "additionalProperties": false,
        "properties": {
          "assignee_ids": {
            "description": "Member ids of your company.",
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "type": "array"
          },
          "connected_tender_id": {
            "description": "Defaults to the board's tender.",
            "format": "uuid",
            "type": "string"
          },
          "description": {
            "maxLength": 20000,
            "type": "string"
          },
          "due_at": {
            "format": "date-time",
            "type": "string"
          },
          "group_id": {
            "description": "The column; the board's first one when left out.",
            "format": "uuid",
            "type": "string"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "type": "object"
      },
      "Document": {
        "additionalProperties": false,
        "properties": {
          "ai_description": {
            "description": "Generated by AI (PublicX).",
            "type": "string"
          },
          "app_url": {
            "type": "string"
          },
          "archived_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "connected_board_task_id": {
            "type": "string"
          },
          "connected_tender_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "connected_tender_id",
          "connected_board_task_id",
          "archived_at",
          "app_url",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "DocumentPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "location": {
            "description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
            "type": "string"
          },
          "message": {
            "description": "Error message text",
            "type": "string"
          },
          "value": {
            "description": "The value at the given location"
          }
        },
        "type": "object"
      },
      "Estimate": {
        "additionalProperties": false,
        "properties": {
          "confidence": {
            "format": "int64",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "execution_period": {
            "type": "string"
          },
          "max": {
            "$ref": "#/components/schemas/Money"
          },
          "min": {
            "$ref": "#/components/schemas/Money"
          },
          "payment_terms": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "reasoning": {
            "type": "string"
          },
          "recommended": {
            "$ref": "#/components/schemas/Money",
            "description": "A suggested bid."
          },
          "source": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Event": {
        "additionalProperties": false,
        "properties": {
          "api_version": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "api_version",
          "timestamp",
          "company_id",
          "data"
        ],
        "type": "object"
      },
      "EventPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "Filters": {
        "additionalProperties": false,
        "properties": {
          "board_ids": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "days_before": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "min_score": {
            "format": "int64",
            "type": "integer"
          },
          "search_ids": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "stages": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "HookEndpoint": {
        "additionalProperties": false,
        "properties": {
          "api_version": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "id": {
            "examples": [
              "ep_01JDZ8V5Q3"
            ],
            "type": "string"
          },
          "secret": {
            "description": "The Standard Webhooks signing secret (whsec_...), shown only when the endpoint is made.",
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "description": "disabled_gone after your receiver answers 410.",
            "enum": [
              "active",
              "paused",
              "disabled_failing",
              "disabled_gone"
            ],
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "event_types",
          "filters",
          "status",
          "source",
          "api_version",
          "created_at"
        ],
        "type": "object"
      },
      "HookEndpointPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/HookEndpoint"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "HookTestOutputBody": {
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string"
          }
        },
        "required": [
          "event_id"
        ],
        "type": "object"
      },
      "LocalDeadline": {
        "additionalProperties": false,
        "properties": {
          "date": {
            "description": "The deadline's day in the tender's time zone.",
            "format": "date",
            "type": "string"
          },
          "date_only": {
            "description": "The source gives a day but no reliable time: treat it as the end of that day, and confirm on the official platform.",
            "type": "boolean"
          },
          "time_zone": {
            "examples": [
              "Europe/Lisbon"
            ],
            "type": "string"
          }
        },
        "required": [
          "date",
          "date_only",
          "time_zone"
        ],
        "type": "object"
      },
      "Me": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "description": "limited plans serve tenders, saved tenders and searches only.",
            "enum": [
              "full",
              "limited"
            ],
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/MeCompany"
          },
          "key": {
            "$ref": "#/components/schemas/MeKey"
          },
          "limits": {
            "$ref": "#/components/schemas/MeLimits"
          },
          "plan": {
            "enum": [
              "starter",
              "professional",
              "enterprise"
            ],
            "type": "string"
          },
          "regions": {
            "description": "Countries the plan covers: pt, br, col.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "company",
          "plan",
          "access",
          "key",
          "regions",
          "limits"
        ],
        "type": "object"
      },
      "MeCompany": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "MeKey": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "examples": [
              "pxk_live_Ab3d"
            ],
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scopes"
        ],
        "type": "object"
      },
      "MeLimits": {
        "additionalProperties": false,
        "properties": {
          "per_day": {
            "description": "Requests per day for the whole company.",
            "format": "int64",
            "type": "integer"
          },
          "per_minute": {
            "description": "Requests per minute for this key.",
            "format": "int64",
            "type": "integer"
          },
          "search_per_minute": {
            "description": "Tender searches per minute for this key.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "per_minute",
          "per_day",
          "search_per_minute"
        ],
        "type": "object"
      },
      "Money": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "description": "The amount, in major units.",
            "format": "double",
            "type": "number"
          },
          "currency": {
            "description": "ISO 4217 code.",
            "examples": [
              "EUR"
            ],
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Problem": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "A stable machine-readable error code.",
            "examples": [
              "insufficient_scope"
            ],
            "type": "string"
          },
          "detail": {
            "description": "What went wrong this time.",
            "type": "string"
          },
          "errors": {
            "description": "Individual problems with the request.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "instance": {
            "description": "The request id, for support.",
            "type": "string"
          },
          "status": {
            "description": "The HTTP status code.",
            "format": "int64",
            "type": "integer"
          },
          "title": {
            "description": "A short summary of the kind of problem.",
            "type": "string"
          },
          "type": {
            "description": "A link to the documentation of this kind of problem.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "type": "object"
      },
      "SaveTenderBody": {
        "additionalProperties": false,
        "properties": {
          "notes": {
            "description": "Replaces the company's notes when given.",
            "maxLength": 20000,
            "type": "string"
          },
          "stage": {
            "description": "The pipeline stage. saved puts it in the pipeline.",
            "enum": [
              "saved",
              "prepared",
              "analysis",
              "go",
              "no-go",
              "presented",
              "awarded",
              "lost"
            ],
            "type": "string"
          }
        },
        "required": [
          "stage"
        ],
        "type": "object"
      },
      "SavedSearch": {
        "additionalProperties": false,
        "properties": {
          "alert_frequency": {
            "enum": [
              "instant",
              "daily",
              "twice",
              "weekly"
            ],
            "type": "string"
          },
          "alerts": {
            "description": "Whether new matches are sent by email.",
            "type": "boolean"
          },
          "country": {
            "enum": [
              "pt",
              "br",
              "col"
            ],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "favourite": {
            "type": "boolean"
          },
          "filters": {
            "additionalProperties": {},
            "description": "The search's filters, as the app stores them.",
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "in_radar": {
            "type": "boolean"
          },
          "last_result_count": {
            "format": "int64",
            "type": "integer"
          },
          "last_run_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "mode": {
            "description": "ai searches by meaning and words, kw by words only.",
            "enum": [
              "ai",
              "kw"
            ],
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "query",
          "country",
          "mode",
          "filters",
          "favourite",
          "in_radar",
          "alerts",
          "alert_frequency",
          "last_run_at",
          "last_result_count",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SavedTender": {
        "additionalProperties": false,
        "properties": {
          "analysis_status": {
            "description": "The AI analysis of the tender against your company.",
            "enum": [
              "none",
              "processing",
              "ready",
              "failed"
            ],
            "type": "string"
          },
          "notes": {
            "description": "Your company's notes on the tender.",
            "type": "string"
          },
          "saved_at": {
            "format": "date-time",
            "type": "string"
          },
          "stage": {
            "enum": [
              "saved",
              "prepared",
              "analysis",
              "go",
              "no-go",
              "presented",
              "awarded",
              "lost"
            ],
            "type": "string"
          },
          "tender": {
            "$ref": "#/components/schemas/TenderSummary"
          },
          "tender_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "tender_id",
          "stage",
          "notes",
          "analysis_status",
          "saved_at",
          "updated_at",
          "tender"
        ],
        "type": "object"
      },
      "SavedTenderPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SavedTender"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "SearchPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SavedSearch"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "Task": {
        "additionalProperties": false,
        "properties": {
          "app_url": {
            "type": "string"
          },
          "assignee_ids": {
            "description": "Member ids.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "board_id": {
            "type": "string"
          },
          "connected_document_id": {
            "type": "string"
          },
          "connected_tender_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "Rich text, as the app stores it.",
            "type": "string"
          },
          "due_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "group_id": {
            "type": "string"
          },
          "group_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "start_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "board_id",
          "group_id",
          "group_name",
          "title",
          "assignee_ids",
          "start_at",
          "due_at",
          "connected_tender_id",
          "connected_document_id",
          "app_url",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "TaskPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Task"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "TenderDetail": {
        "additionalProperties": false,
        "properties": {
          "ai_estimate": {
            "$ref": "#/components/schemas/Estimate",
            "description": "Generated by AI (PublicX). An estimate, not the buyer's figure."
          },
          "ai_summary": {
            "description": "Generated by AI (PublicX).",
            "type": "string"
          },
          "app_url": {
            "description": "The tender in the PublicX app.",
            "type": "string"
          },
          "classification_codes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "contract_type": {
            "description": "works, goods, services, mixed, concession or other, where known.",
            "type": "string"
          },
          "country": {
            "description": "pt Portugal, br Brazil, col Colombia (as in webhooks).",
            "enum": [
              "pt",
              "br",
              "col"
            ],
            "type": "string"
          },
          "cpv": {
            "description": "CPV codes (Portugal) or the source's main classification.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "deadline_at": {
            "description": "The bid deadline as a UTC instant.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "deadline_local": {
            "$ref": "#/components/schemas/LocalDeadline"
          },
          "description": {
            "type": "string"
          },
          "entity": {
            "description": "The contracting authority.",
            "type": "string"
          },
          "entity_tax_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "manual": {
            "description": "Added by your company; only your company sees it.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "platform": {
            "description": "Where bids are submitted.",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Money",
            "description": "The base price published by the buyer, when known."
          },
          "procedure_type": {
            "type": "string"
          },
          "published_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "description": "The procedure or announcement number.",
            "type": "string"
          },
          "required_documents": {
            "description": "Extracted by AI from the tender's documents.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "sectors": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "source_url": {
            "description": "The tender on the official platform, when known.",
            "type": "string"
          },
          "stage": {
            "description": "Your pipeline stage; only for keys with saved:read.",
            "enum": [
              "saved",
              "prepared",
              "analysis",
              "go",
              "no-go",
              "presented",
              "awarded",
              "lost"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "manual",
          "updated_at",
          "id",
          "country",
          "name",
          "entity",
          "location",
          "platform",
          "source_url",
          "app_url",
          "cpv",
          "price",
          "published_at",
          "deadline_at"
        ],
        "type": "object"
      },
      "TenderPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TenderSummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "type": "object"
      },
      "TenderSummary": {
        "additionalProperties": false,
        "properties": {
          "ai_summary": {
            "description": "Generated by AI (PublicX).",
            "type": "string"
          },
          "app_url": {
            "description": "The tender in the PublicX app.",
            "type": "string"
          },
          "classification_codes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "contract_type": {
            "description": "works, goods, services, mixed, concession or other, where known.",
            "type": "string"
          },
          "country": {
            "description": "pt Portugal, br Brazil, col Colombia (as in webhooks).",
            "enum": [
              "pt",
              "br",
              "col"
            ],
            "type": "string"
          },
          "cpv": {
            "description": "CPV codes (Portugal) or the source's main classification.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "deadline_at": {
            "description": "The bid deadline as a UTC instant.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "deadline_local": {
            "$ref": "#/components/schemas/LocalDeadline"
          },
          "entity": {
            "description": "The contracting authority.",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "platform": {
            "description": "Where bids are submitted.",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Money",
            "description": "The base price published by the buyer, when known."
          },
          "procedure_type": {
            "type": "string"
          },
          "published_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "sectors": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "source_url": {
            "description": "The tender on the official platform, when known.",
            "type": "string"
          },
          "stage": {
            "description": "Your pipeline stage; only for keys with saved:read.",
            "enum": [
              "saved",
              "prepared",
              "analysis",
              "go",
              "no-go",
              "presented",
              "awarded",
              "lost"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "country",
          "name",
          "entity",
          "location",
          "platform",
          "source_url",
          "app_url",
          "cpv",
          "price",
          "published_at",
          "deadline_at"
        ],
        "type": "object"
      },
      "UpdateHookBody": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 200,
            "type": "string"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "maxItems": 25,
            "minItems": 1,
            "type": "array"
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "status": {
            "enum": [
              "active",
              "paused"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateSavedTenderBody": {
        "additionalProperties": false,
        "properties": {
          "notes": {
            "maxLength": 20000,
            "type": "string"
          },
          "stage": {
            "enum": [
              "saved",
              "prepared",
              "analysis",
              "go",
              "no-go",
              "presented",
              "awarded",
              "lost"
            ],
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "pxk_live_...",
        "description": "A company API key, created in Settings \u003e API keys.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Read and change your PublicX data: tenders, your pipeline, saved searches, documents and boards, and subscribe to its events with webhooks.\n\nAuthenticate with a company API key: `Authorization: Bearer pxk_live_...`. Writes accept an `Idempotency-Key`. Errors are RFC 9457 problem details. Lists page with an opaque `cursor`. Rate limits are announced in the `RateLimit-Policy` and `RateLimit` headers.\n\nGuides, webhook signatures and the Zapier app: https://developers.publicx.ai",
    "title": "PublicX API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/boards": {
      "get": {
        "operationId": "list-boards",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "boards:read"
            ]
          }
        ],
        "summary": "List boards",
        "tags": [
          "Boards"
        ]
      }
    },
    "/boards/{id}": {
      "get": {
        "operationId": "get-board",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Board"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "boards:read"
            ]
          }
        ],
        "summary": "Get a board and its groups",
        "tags": [
          "Boards"
        ]
      }
    },
    "/boards/{id}/tasks": {
      "get": {
        "operationId": "list-board-tasks",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "boards:read"
            ]
          }
        ],
        "summary": "List a board's tasks",
        "tags": [
          "Boards"
        ]
      },
      "post": {
        "operationId": "create-task",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "boards:write"
            ]
          }
        ],
        "summary": "Create a task on a board",
        "tags": [
          "Boards"
        ]
      }
    },
    "/certificates": {
      "get": {
        "description": "Certificates and company papers in the vault, with their expiry. Files can't be downloaded through the API.",
        "operationId": "list-certificates",
        "parameters": [
          {
            "description": "Only files expiring before this instant.",
            "explode": false,
            "in": "query",
            "name": "expires_before",
            "schema": {
              "description": "Only files expiring before this instant.",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertificatePage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "documents:read"
            ]
          }
        ],
        "summary": "List vault files",
        "tags": [
          "Documents"
        ]
      }
    },
    "/documents": {
      "get": {
        "description": "Your company's proposal documents: titles and links, not their content.",
        "operationId": "list-documents",
        "parameters": [
          {
            "description": "Only documents for this tender.",
            "explode": false,
            "in": "query",
            "name": "tender_id",
            "schema": {
              "description": "Only documents for this tender.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Archived documents instead of current ones.",
            "explode": false,
            "in": "query",
            "name": "archived",
            "schema": {
              "description": "Archived documents instead of current ones.",
              "type": "boolean"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "documents:read"
            ]
          }
        ],
        "summary": "List documents",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "operationId": "create-document",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "documents:write"
            ]
          }
        ],
        "summary": "Create a document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/documents/{id}": {
      "get": {
        "operationId": "get-document",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "documents:read"
            ]
          }
        ],
        "summary": "Get a document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/events": {
      "get": {
        "description": "The last 30 days of events this key may see, newest first, in the webhook envelope. Kept while the company has a key with webhooks:write. A page can hold fewer items than limit; follow next_cursor.",
        "operationId": "list-events",
        "parameters": [
          {
            "description": "Only this event type, e.g. saved_tender.stage_changed.",
            "explode": false,
            "in": "query",
            "name": "type",
            "schema": {
              "description": "Only this event type, e.g. saved_tender.stage_changed.",
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "description": "Only events after this instant.",
            "explode": false,
            "in": "query",
            "name": "since",
            "schema": {
              "description": "Only events after this instant.",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List recent events",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/me": {
      "get": {
        "description": "The company, plan, scopes and limits behind the key. Use it to test a connection.",
        "operationId": "get-me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "This key and its company",
        "tags": [
          "Account"
        ]
      }
    },
    "/saved-tenders": {
      "get": {
        "description": "Your company's pipeline, oldest change first.",
        "operationId": "list-saved-tenders",
        "parameters": [
          {
            "description": "Only this pipeline stage.",
            "explode": false,
            "in": "query",
            "name": "stage",
            "schema": {
              "description": "Only this pipeline stage.",
              "enum": [
                "saved",
                "prepared",
                "analysis",
                "go",
                "no-go",
                "presented",
                "awarded",
                "lost"
              ],
              "type": "string"
            }
          },
          {
            "description": "Only rows changed at or after this instant. Pair it with the cursor for an incremental sync.",
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "description": "Only rows changed at or after this instant. Pair it with the cursor for an incremental sync.",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedTenderPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "saved:read"
            ]
          }
        ],
        "summary": "List saved tenders",
        "tags": [
          "Pipeline"
        ]
      }
    },
    "/saved-tenders/{tender_id}": {
      "delete": {
        "operationId": "remove-saved-tender",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "tender_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "saved:write"
            ]
          }
        ],
        "summary": "Remove a tender from the pipeline",
        "tags": [
          "Pipeline"
        ]
      },
      "get": {
        "operationId": "get-saved-tender",
        "parameters": [
          {
            "in": "path",
            "name": "tender_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedTender"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "saved:read"
            ]
          }
        ],
        "summary": "Get a saved tender",
        "tags": [
          "Pipeline"
        ]
      },
      "patch": {
        "description": "The tender must already be in your pipeline.",
        "operationId": "update-saved-tender",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "tender_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSavedTenderBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedTender"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "saved:write"
            ]
          }
        ],
        "summary": "Change a saved tender's stage or notes",
        "tags": [
          "Pipeline"
        ]
      },
      "put": {
        "description": "Puts the tender in your pipeline at the stage given, or moves it there. Safe to repeat.",
        "operationId": "save-tender",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "tender_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveTenderBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedTender"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "saved:write"
            ]
          }
        ],
        "summary": "Save a tender, or move it to a stage",
        "tags": [
          "Pipeline"
        ]
      }
    },
    "/searches": {
      "get": {
        "description": "Your company's shared searches. A member's private searches are never served to a company key.",
        "operationId": "list-searches",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "country",
            "schema": {
              "enum": [
                "pt",
                "br",
                "col",
                "co"
              ],
              "type": "string"
            }
          },
          {
            "description": "Only searches marked as favourites.",
            "explode": false,
            "in": "query",
            "name": "favourite",
            "schema": {
              "description": "Only searches marked as favourites.",
              "type": "boolean"
            }
          },
          {
            "description": "Only searches that send alerts.",
            "explode": false,
            "in": "query",
            "name": "alerts",
            "schema": {
              "description": "Only searches that send alerts.",
              "type": "boolean"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "searches:read"
            ]
          }
        ],
        "summary": "List saved searches",
        "tags": [
          "Searches"
        ]
      }
    },
    "/searches/{id}": {
      "get": {
        "operationId": "get-search",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSearch"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "searches:read"
            ]
          }
        ],
        "summary": "Get a saved search",
        "tags": [
          "Searches"
        ]
      }
    },
    "/tasks/{id}": {
      "get": {
        "operationId": "get-task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "boards:read"
            ]
          }
        ],
        "summary": "Get a task",
        "tags": [
          "Boards"
        ]
      }
    },
    "/tenders": {
      "get": {
        "description": "The app's search: words and meaning together, newest deadlines first. Results stop after 1,000 hits; narrow with filters, or follow a saved search's webhook for new matches. Pages are stable for about five minutes.",
        "operationId": "search-tenders",
        "parameters": [
          {
            "description": "Words to search for, in any language the tenders use. Quote a phrase for an exact match; prefix a word with - to leave it out. A Portuguese announcement number finds that tender.",
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "description": "Words to search for, in any language the tenders use. Quote a phrase for an exact match; prefix a word with - to leave it out. A Portuguese announcement number finds that tender.",
              "maxLength": 500,
              "type": "string"
            }
          },
          {
            "description": "Defaults to the company's primary country.",
            "explode": false,
            "in": "query",
            "name": "country",
            "schema": {
              "description": "Defaults to the company's primary country.",
              "enum": [
                "pt",
                "br",
                "col",
                "co"
              ],
              "type": "string"
            }
          },
          {
            "description": "CPV or classification codes, comma separated.",
            "explode": false,
            "in": "query",
            "name": "cpv",
            "schema": {
              "description": "CPV or classification codes, comma separated.",
              "items": {
                "type": "string"
              },
              "maxItems": 100,
              "type": "array"
            }
          },
          {
            "description": "Deadline on or after this instant (RFC 3339).",
            "explode": false,
            "in": "query",
            "name": "deadline_from",
            "schema": {
              "description": "Deadline on or after this instant (RFC 3339).",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Deadline on or before this instant (RFC 3339).",
            "explode": false,
            "in": "query",
            "name": "deadline_to",
            "schema": {
              "description": "Deadline on or before this instant (RFC 3339).",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "price_min",
            "schema": {
              "format": "double",
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "price_max",
            "schema": {
              "format": "double",
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "Also tenders whose deadline has passed.",
            "explode": false,
            "in": "query",
            "name": "include_closed",
            "schema": {
              "description": "Also tenders whose deadline has passed.",
              "type": "boolean"
            }
          },
          {
            "description": "Items per page, 1 to 100.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "description": "Items per page, 1 to 100.",
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "The next_cursor of the previous page.",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenderPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "tenders:read"
            ]
          }
        ],
        "summary": "Search open tenders",
        "tags": [
          "Tenders"
        ]
      }
    },
    "/tenders/{id}": {
      "get": {
        "description": "One tender with its description and AI estimate. Official documents stay on the source platform: follow source_url.",
        "operationId": "get-tender",
        "parameters": [
          {
            "description": "The tender's id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "The tender's id.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenderDetail"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "tenders:read"
            ]
          }
        ],
        "summary": "Get a tender",
        "tags": [
          "Tenders"
        ]
      }
    },
    "/webhook-endpoints": {
      "get": {
        "operationId": "list-webhook-endpoints",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEndpointPage"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "List this key's webhook endpoints",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "A REST hook: events go to the URL, signed with Standard Webhooks, until you delete it or the key ends. Your plan's endpoint limit applies. Each type needs the read scope its data comes from.",
        "operationId": "create-webhook-endpoint",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateHookBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEndpoint"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "Subscribe a URL to events",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints/{id}": {
      "delete": {
        "operationId": "delete-webhook-endpoint",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 40,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "Unsubscribe",
        "tags": [
          "Webhooks"
        ]
      },
      "get": {
        "operationId": "get-webhook-endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 40,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEndpoint"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "Get a webhook endpoint",
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "operationId": "update-webhook-endpoint",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 40,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateHookBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEndpoint"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "Change a webhook endpoint's events, filters or status",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints/{id}/test": {
      "post": {
        "operationId": "test-webhook-endpoint",
        "parameters": [
          {
            "description": "Any unique string, up to 255 characters. A retry with the same key and body gets the first answer again (with Idempotent-Replayed: true) for 24 hours, and does nothing twice.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 40,
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookTestOutputBody"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "summary": "Send a test event",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.publicx.ai/v1"
    }
  ],
  "tags": [
    {
      "description": "The key and its company.",
      "name": "Account"
    },
    {
      "description": "Open tenders in the countries your plan covers.",
      "name": "Tenders"
    },
    {
      "description": "Tenders your company saved, with their stage.",
      "name": "Pipeline"
    },
    {
      "description": "Your company's shared saved searches.",
      "name": "Searches"
    },
    {
      "description": "Proposal documents and company file expiries.",
      "name": "Documents"
    },
    {
      "description": "Boards, their groups and tasks.",
      "name": "Boards"
    },
    {
      "description": "REST hooks: subscribe a URL to events, and poll recent events.",
      "name": "Webhooks"
    }
  ]
}
