{
 "openapi": "3.1.0",
 "info": {
  "title": "Unicorn Data API",
  "version": "1.0.0",
  "description": "Private market and IPO data: reported valuations with date and source, funding rounds, SEC filings, IPO pipeline and calendar, lock-ups, aggregate community forecasts. Data from Unicorn Watch (public sources cited per figure). Reported valuations are not market prices. Information only, not investment advice. Plans: Start ($0/month, no card, 1,000 calls per month on /v1/companies, /v1/ipo/calendar and /v1/usage, attribution with a link required), Widget, Pro, Business; see https://data.unicornprivate.com/docs#plans.",
  "termsOfService": "https://data.unicornprivate.com/terms",
  "contact": {
   "name": "Unicorn Data",
   "url": "https://data.unicornprivate.com/docs"
  }
 },
 "servers": [
  {
   "url": "https://data.unicornprivate.com"
  }
 ],
 "security": [
  {
   "bearer": []
  }
 ],
 "tags": [
  {
   "name": "Companies"
  },
  {
   "name": "Events"
  },
  {
   "name": "IPO"
  },
  {
   "name": "Webhooks"
  },
  {
   "name": "Exports"
  },
  {
   "name": "Account"
  }
 ],
 "paths": {
  "/v1/companies": {
   "get": {
    "tags": [
     "Companies"
    ],
    "summary": "List tracked private companies",
    "description": "All plans, Start ($0/month) included.",
    "operationId": "listCompanies",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "description": "Language of sector, country, notes and event titles (en it fr de es pt ru zh ja hi ko tr id ar vi pl). Default en.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "sector",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "English sector name, e.g. Artificial intelligence"
     },
     {
      "name": "country",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ipo_status",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Comma separated: none, rumored, confidential, public_filing, priced, listed"
     },
     {
      "name": "q",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Name contains"
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 100,
       "maximum": 200
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Company"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/companies/{id}": {
   "get": {
    "tags": [
     "Companies"
    ],
    "summary": "Company profile with full valuation history and events",
    "description": "Pro and Business.",
    "operationId": "getCompany",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "anthropic"
     },
     {
      "name": "lang",
      "in": "query",
      "description": "Language of sector, country, notes and event titles (en it fr de es pt ru zh ja hi ko tr id ar vi pl). Default en.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/CompanyDetail"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/events": {
   "get": {
    "tags": [
     "Events"
    ],
    "summary": "Events recorded after a timestamp",
    "description": "Funding rounds, valuations, secondary prices, IPO news, SEC filings. Poll with since = meta.nextSince. Pro and Business.",
    "operationId": "listEvents",
    "parameters": [
     {
      "name": "since",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "date-time"
      },
      "description": "Recorded after this time (createdAt). Default: 30 days ago."
     },
     {
      "name": "type",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Comma separated: round, valuation, secondary, ipo, filing, news"
     },
     {
      "name": "company",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 100,
       "maximum": 1000
      }
     },
     {
      "name": "lang",
      "in": "query",
      "description": "Language of sector, country, notes and event titles (en it fr de es pt ru zh ja hi ko tr id ar vi pl). Default en.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Event"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/ipo/calendar": {
   "get": {
    "tags": [
     "IPO"
    ],
    "summary": "IPO calendar (last 90 days and upcoming)",
    "description": "All plans, Start ($0/month) included.",
    "operationId": "ipoCalendar",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "description": "Language of sector, country, notes and event titles (en it fr de es pt ru zh ja hi ko tr id ar vi pl). Default en.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Company"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/ipo/pipeline": {
   "get": {
    "tags": [
     "IPO"
    ],
    "summary": "Companies by IPO stage (press reports, confidential filing, public filing, priced)",
    "description": "Pro and Business.",
    "operationId": "ipoPipeline",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "description": "Language of sector, country, notes and event titles (en it fr de es pt ru zh ja hi ko tr id ar vi pl). Default en.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Company"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/lockups": {
   "get": {
    "tags": [
     "IPO"
    ],
    "summary": "Lock-up end dates",
    "description": "Pro and Business.",
    "operationId": "lockups",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "lockupEnd": {
              "type": "string"
             },
             "upcoming": {
              "type": "boolean"
             },
             "ipo": {
              "$ref": "#/components/schemas/Ipo"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/forecasts": {
   "get": {
    "tags": [
     "Companies"
    ],
    "summary": "Aggregate community forecasts (expected IPO month and value)",
    "description": "Statistics only from 5 votes; individual votes are never shared. Pro and Business.",
    "operationId": "forecasts",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "community": {
              "$ref": "#/components/schemas/Community"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/usage": {
   "get": {
    "tags": [
     "Account"
    ],
    "summary": "Usage this month",
    "description": "All plans, Start ($0/month) included. Not counted.",
    "operationId": "usage",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "properties": {
            "plan": {
             "type": "string"
            },
            "month": {
             "type": "string"
            },
            "calls": {
             "type": "integer"
            },
            "widgetCalls": {
             "type": "integer"
            },
            "limit": {
             "type": "integer"
            },
            "resetAt": {
             "type": "string"
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/webhooks": {
   "get": {
    "tags": [
     "Webhooks"
    ],
    "summary": "List webhook endpoints",
    "operationId": "listWebhooks",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/WebhookEndpoint"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   },
   "post": {
    "tags": [
     "Webhooks"
    ],
    "summary": "Create a webhook endpoint (the secret is returned once)",
    "operationId": "createWebhook",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "format": "uri"
         },
         "types": {
          "type": "array",
          "items": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/WebhookEndpoint"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/webhooks/{id}": {
   "delete": {
    "tags": [
     "Webhooks"
    ],
    "summary": "Delete a webhook endpoint",
    "operationId": "deleteWebhook",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Deleted"
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/webhooks/{id}/test": {
   "post": {
    "tags": [
     "Webhooks"
    ],
    "summary": "Send a signed test event",
    "operationId": "testWebhook",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/exports": {
   "get": {
    "tags": [
     "Exports"
    ],
    "summary": "Available daily exports (Business)",
    "operationId": "listExports",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "day": {
              "type": "string"
             },
             "bytes": {
              "type": "integer"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/exports/{day}.json": {
   "get": {
    "tags": [
     "Exports"
    ],
    "summary": "Full daily dataset as JSON (Business)",
    "operationId": "exportJson",
    "parameters": [
     {
      "name": "day",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "YYYY-MM-DD or latest"
     }
    ],
    "responses": {
     "200": {
      "description": "JSON file"
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/exports/{day}/{table}.csv": {
   "get": {
    "tags": [
     "Exports"
    ],
    "summary": "Daily CSV: companies, valuations or events (Business)",
    "operationId": "exportCsv",
    "parameters": [
     {
      "name": "day",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "table",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "companies",
        "valuations",
        "events"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "CSV file",
      "content": {
       "text/csv": {}
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "401": {
      "$ref": "#/components/responses/Error"
     },
     "402": {
      "$ref": "#/components/responses/Error"
     },
     "403": {
      "$ref": "#/components/responses/Error"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     },
     "503": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/v1/status": {
   "get": {
    "tags": [
     "Account"
    ],
    "summary": "Service status (no key needed)",
    "security": [],
    "operationId": "status",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  }
 },
 "webhooks": {
  "event.created": {
   "post": {
    "summary": "A new event was recorded",
    "description": "Header Unicorn-Data-Signature: t=<unix>,v1=<hex HMAC SHA-256 of \"<t>.<raw body>\" with the endpoint secret>. Answer 2xx within 10 seconds; failures are retried after 1, 5, 30, 120, 360, 720 and 1440 minutes.",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "type": {
          "type": "string",
          "const": "event.created"
         },
         "created": {
          "type": "string",
          "format": "date-time"
         },
         "data": {
          "$ref": "#/components/schemas/Event"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Received"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "API key from the dashboard: ud_live_..."
   }
  },
  "headers": {
   "Limit": {
    "schema": {
     "type": "integer"
    },
    "description": "Monthly calls included in the plan"
   },
   "Remaining": {
    "schema": {
     "type": "integer"
    },
    "description": "Calls left this month"
   },
   "Reset": {
    "schema": {
     "type": "integer"
    },
    "description": "Unix time of the monthly reset (1st of next month, UTC)"
   }
  },
  "responses": {
   "Error": {
    "description": "Error",
    "content": {
     "application/json": {
      "schema": {
       "type": "object",
       "properties": {
        "error": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "message": {
           "type": "string"
          },
          "status": {
           "type": "integer"
          },
          "docs": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "schemas": {
   "Meta": {
    "type": "object",
    "properties": {
     "note": {
      "type": "string"
     },
     "attribution": {
      "type": "object",
      "properties": {
       "text": {
        "type": "string"
       },
       "url": {
        "type": "string"
       }
      }
     }
    },
    "additionalProperties": true
   },
   "Ipo": {
    "type": "object",
    "properties": {
     "status": {
      "type": "string",
      "enum": [
       "none",
       "rumored",
       "confidential",
       "public_filing",
       "priced",
       "listed"
      ]
     },
     "date": {
      "type": [
       "string",
       "null"
      ]
     },
     "note": {
      "type": "string"
     },
     "sourceUrl": {
      "type": "string"
     },
     "lockupEnd": {
      "type": [
       "string",
       "null"
      ]
     }
    }
   },
   "Company": {
    "type": "object",
    "properties": {
     "rank": {
      "type": "integer"
     },
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "sector": {
      "type": "string"
     },
     "country": {
      "type": "string"
     },
     "founded": {
      "type": [
       "integer",
       "null"
      ]
     },
     "website": {
      "type": "string"
     },
     "cik": {
      "type": [
       "string",
       "null"
      ]
     },
     "valuationUsdBn": {
      "type": [
       "number",
       "null"
      ],
      "description": "Reported valuation, billions of USD"
     },
     "valuationDate": {
      "type": "string",
      "description": "YYYY-MM"
     },
     "valuationKind": {
      "type": "string",
      "enum": [
       "round",
       "secondary",
       "report"
      ]
     },
     "sourceName": {
      "type": "string"
     },
     "sourceUrl": {
      "type": "string"
     },
     "changePct": {
      "type": [
       "number",
       "null"
      ]
     },
     "previousUsdBn": {
      "type": [
       "number",
       "null"
      ]
     },
     "previousDate": {
      "type": [
       "string",
       "null"
      ]
     },
     "ipo": {
      "$ref": "#/components/schemas/Ipo"
     },
     "updatedAt": {
      "type": "string"
     }
    }
   },
   "Valuation": {
    "type": "object",
    "properties": {
     "date": {
      "type": "string"
     },
     "valuationUsdBn": {
      "type": "number"
     },
     "kind": {
      "type": "string"
     },
     "sourceName": {
      "type": "string"
     },
     "sourceUrl": {
      "type": "string"
     },
     "note": {
      "type": "string"
     }
    }
   },
   "Event": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "companyId": {
      "type": "string"
     },
     "companyName": {
      "type": "string"
     },
     "type": {
      "type": "string",
      "enum": [
       "round",
       "valuation",
       "secondary",
       "ipo",
       "filing",
       "news"
      ]
     },
     "date": {
      "type": "string"
     },
     "title": {
      "type": "string"
     },
     "summary": {
      "type": "string"
     },
     "sourceName": {
      "type": "string"
     },
     "sourceUrl": {
      "type": "string"
     },
     "valuationUsdBn": {
      "type": [
       "number",
       "null"
      ]
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     }
    }
   },
   "Community": {
    "type": "object",
    "properties": {
     "votes": {
      "type": "integer"
     },
     "enough": {
      "type": "boolean"
     },
     "minVotes": {
      "type": "integer"
     },
     "valueMedianUsdBn": {
      "type": [
       "number",
       "null"
      ]
     },
     "valueP25UsdBn": {
      "type": [
       "number",
       "null"
      ]
     },
     "valueP75UsdBn": {
      "type": [
       "number",
       "null"
      ]
     },
     "premiumPct": {
      "type": [
       "number",
       "null"
      ]
     },
     "aboveCurrentPct": {
      "type": [
       "number",
       "null"
      ]
     },
     "sentiment": {
      "type": [
       "string",
       "null"
      ]
     },
     "monthMedian": {
      "type": [
       "string",
       "null"
      ]
     },
     "within12mPct": {
      "type": [
       "number",
       "null"
      ]
     },
     "asOf": {
      "type": [
       "string",
       "null"
      ]
     }
    }
   },
   "CompanyDetail": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Company"
     },
     {
      "type": "object",
      "properties": {
       "note": {
        "type": "string"
       },
       "history": {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/Valuation"
        }
       },
       "events": {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/Event"
        }
       },
       "community": {
        "$ref": "#/components/schemas/Community"
       },
       "disclaimer": {
        "type": "string"
       }
      }
     }
    ]
   },
   "WebhookEndpoint": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "url": {
      "type": "string"
     },
     "types": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "active": {
      "type": "boolean"
     },
     "secret": {
      "type": "string",
      "description": "Only in the creation response"
     }
    }
   }
  }
 }
}