{
  "openapi": "3.1.0",
  "info": {
    "title": "Veezee API",
    "version": "1.1",
    "description": "LinkedIn data for AI agents: profiles, people search, companies, and posts, metered in credits with per-call receipts. Same contract as the MCP server at https://mcp.veezee.io/mcp.",
    "contact": {
      "email": "hello@veezee.io",
      "url": "https://veezee.io"
    }
  },
  "servers": [
    {
      "url": "https://api.veezee.io"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/provision": {
      "post": {
        "operationId": "provision",
        "summary": "Create a free trial account",
        "description": "Create a free trial account and get an API key, no signup and no card. Call this first if you have no key: you get 500 free credits. Over MCP, later calls in this same session authenticate automatically; over REST, send the key as 'Authorization: Bearer <key>' on every call. The response includes the api_key (shown exactly once, so store it) and a claim_url to keep the account permanently. Costs 0 credits. Trial limits: 1 concurrent call, 20 calls/minute, search capped at 10 results per call, 5 realtime fetches total. Not for checking your balance: that is get_usage.",
        "x-input-examples": [
          {
            "summary": "First contact, no key yet",
            "value": {}
          }
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "provision envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/provision_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/resolve": {
      "get": {
        "operationId": "resolveUrl",
        "summary": "Identify a LinkedIn URL",
        "description": "Identify what a LinkedIn URL points at before fetching it. Give any LinkedIn profile, company, or post URL (utm params, www/m subdomains, trailing slashes are fine); get back {type: person|company|post, id, handle, canonical_url}. For profile URLs, id is the stable person URN; for company URLs, id is the stable company URN; for post URLs, id is the activity URN extracted from the URL. Use the returned handle or id with get_profile, get_company, or get_posts. Costs 2 credits. Skip this tool when you already have a slug, URN, or clean URL: get_profile and get_company accept those directly, so resolving first would waste 2 credits. Not for non-LinkedIn URLs; it returns INVALID_INPUT for those.",
        "x-input-examples": [
          {
            "summary": "Profile URL from a user message",
            "value": {
              "url": "https://www.linkedin.com/in/williamhgates?utm_source=share"
            }
          },
          {
            "summary": "Company URL",
            "value": {
              "url": "https://linkedin.com/company/anthropicresearch"
            }
          }
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A LinkedIn URL, e.g. https://www.linkedin.com/in/williamhgates or .../company/microsoft."
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Unique key per logical call (UUID recommended). Reuse the SAME key when retrying the same call; a replay returns the stored result without charging again. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "url_resolution envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/url_resolution_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/profiles": {
      "get": {
        "operationId": "getProfile",
        "summary": "Get a LinkedIn person profile",
        "description": "Fetch one person's LinkedIn profile. identifier accepts a profile URL, the slug after /in/ (e.g. 'williamhgates'), or a urn:li:fsd_profile URN; URLs are cleaned automatically. Always returns the overview (name, headline, location, current position, follower counts) plus up to 2 requested sections from about|experience|education|skills at no extra cost; each section beyond 2 adds 2 credits (max 4 sections). Costs 4 credits base. If you only have a name, use search_people first; this tool does not search. Results from search_people with is_anonymous=true cannot be fetched here; treat them as 'someone matching this exists' and stop. Companies belong to get_company.",
        "x-input-examples": [
          {
            "summary": "By slug, overview only",
            "value": {
              "identifier": "williamhgates"
            }
          },
          {
            "summary": "By URL with work history and education",
            "value": {
              "identifier": "https://www.linkedin.com/in/williamhgates",
              "sections": [
                "experience",
                "education"
              ]
            }
          },
          {
            "summary": "Live fetch by URN",
            "value": {
              "identifier": "urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc",
              "freshness": "realtime"
            }
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Profile URL, slug (after /in/), or urn:li:fsd_profile URN."
            }
          },
          {
            "name": "sections",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "description": "Extra profile sections. First 2 are included in the base price.",
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "about",
                  "experience",
                  "education",
                  "skills"
                ]
              }
            }
          },
          {
            "name": "freshness",
            "in": "query",
            "required": false,
            "schema": {
              "default": "recent",
              "description": "recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data).",
              "type": "string",
              "enum": [
                "recent",
                "realtime"
              ]
            }
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Unique key per logical call (UUID recommended). Reuse the SAME key when retrying the same call; a replay returns the stored result without charging again. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "person envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/person_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/people": {
      "get": {
        "operationId": "searchPeople",
        "summary": "Search people on LinkedIn",
        "description": "Find people on LinkedIn by keywords and filters. The right tool when you have a name, role, or 'who is the X at Y' question without a profile URL. Pass keywords (free text: name, title, or both) and any of first_name, last_name, title, school, current_company, past_company. Company filters accept a company name, slug, numeric id, or URN; names are resolved for you. Costs 10 credits including the first 10 results; each further 10 results add 1 credit (limit max 30; trial keys max 10). A cursor page is a NEW call priced the same way by its own limit, so one limit=30 call is much cheaper than three limit=10 pages; prefer a larger limit over paginating. Do NOT combine a company NAME filter with limit=30: name resolution spends one of the call's three internal fetches, so that combination is rejected. With a company name keep limit<=20; for limit=30 pass the company's numeric id or URN (get_company returns both). Returns name, position, location, urn, public_identifier per result, a cursor for the next page, and total_matches. Results with is_anonymous=true are private profiles; do not pass them to get_profile. For one known person with a URL/slug, call get_profile directly instead.",
        "x-input-examples": [
          {
            "summary": "Role at a company",
            "value": {
              "keywords": "CTO",
              "current_company": "anthropic"
            }
          },
          {
            "summary": "Name search, more results",
            "value": {
              "keywords": "John Smith",
              "title": "software engineer",
              "limit": 30
            }
          },
          {
            "summary": "Next page",
            "value": {
              "keywords": "CTO",
              "current_company": "anthropic",
              "cursor": "<cursor from previous response>"
            }
          }
        ],
        "parameters": [
          {
            "name": "keywords",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Free-text query: a name, a title, or both.",
              "type": "string"
            }
          },
          {
            "name": "first_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "last_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Current job title filter.",
              "type": "string"
            }
          },
          {
            "name": "school",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "current_company",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Company name, slug, numeric id, or urn:li:fsd_company URN.",
              "type": "string"
            }
          },
          {
            "name": "past_company",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Same accepted forms as current_company.",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 10,
              "description": "How many results to return.",
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Cursor from a previous page.",
              "type": "string"
            }
          },
          {
            "name": "freshness",
            "in": "query",
            "required": false,
            "schema": {
              "default": "recent",
              "description": "recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data).",
              "type": "string",
              "enum": [
                "recent",
                "realtime"
              ]
            }
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Unique key per logical call (UUID recommended). Reuse the SAME key when retrying the same call; a replay returns the stored result without charging again. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "people_search envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/people_search_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies": {
      "get": {
        "operationId": "getCompany",
        "summary": "Get a LinkedIn company",
        "description": "Fetch one company's LinkedIn page: name, description, industry, employee count, headquarters, website, founding year, specialities, and the URN/numeric id you need for search_people company filters. identifier accepts a company URL, the slug after /company/ (e.g. 'microsoft'), a numeric LinkedIn company id, or a website domain like 'microsoft.com'. Domains are resolved to a company and verified against that company's website: a domain identifier always QUOTES base+4 credits (set max_credits accordingly), and the 4-credit resolution surcharge is refunded at settlement when the domain was resolved before, so known domains settle at the base price. A domain that cannot be verified to a company returns INVALID_INPUT with the closest matches instead of a guessed company. Costs 4 credits base. This tool does not search by name: if you only have an approximate company name, use search_people's current_company filter (it resolves names) or give the exact slug. For the company's posts, use get_posts with the same identifier.",
        "x-input-examples": [
          {
            "summary": "By slug",
            "value": {
              "identifier": "microsoft"
            }
          },
          {
            "summary": "By website domain",
            "value": {
              "identifier": "microsoft.com"
            }
          },
          {
            "summary": "By URL, live",
            "value": {
              "identifier": "https://www.linkedin.com/company/anthropicresearch/",
              "freshness": "realtime"
            }
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Company URL, slug (after /company/), numeric LinkedIn company id, or website domain (e.g. 'microsoft.com')."
            }
          },
          {
            "name": "freshness",
            "in": "query",
            "required": false,
            "schema": {
              "default": "recent",
              "description": "recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data).",
              "type": "string",
              "enum": [
                "recent",
                "realtime"
              ]
            }
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Unique key per logical call (UUID recommended). Reuse the SAME key when retrying the same call; a replay returns the stored result without charging again. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "company envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts": {
      "get": {
        "operationId": "getPosts",
        "summary": "Get recent posts by a person or company",
        "description": "Fetch the recent LinkedIn posts of one person or one company. identifier accepts a profile or company URL, slug, or URN; the entity type is detected automatically. Returns one page of posts (text, created_at, author, likes, comments_count, shares, is_repost, url) with a cursor for older posts. Costs 4 credits per page. Use this for 'what has X been posting', voice-of-company research, or activity checks before outreach. Not for reading one specific post you already have a URL for, and not for keyword search across LinkedIn; neither is supported in v1.",
        "x-input-examples": [
          {
            "summary": "Company posts",
            "value": {
              "identifier": "https://www.linkedin.com/company/microsoft/"
            }
          },
          {
            "summary": "Person's posts by slug",
            "value": {
              "identifier": "williamhgates"
            }
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Person or company URL, slug, or URN."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Cursor from a previous page for older posts.",
              "type": "string"
            }
          },
          {
            "name": "freshness",
            "in": "query",
            "required": false,
            "schema": {
              "default": "recent",
              "description": "recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data).",
              "type": "string",
              "enum": [
                "recent",
                "realtime"
              ]
            }
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Unique key per logical call (UUID recommended). Reuse the SAME key when retrying the same call; a replay returns the stored result without charging again. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "posts envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/posts_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Check credits and recent charges",
        "description": "Check your balance, plan, limits, and the last 10 charges (receipt ids included). Costs 0 credits and is exempt from the per-minute rate limit, so call it whenever you need to budget. The response includes upgrade_url: give it to your human when credits or plan limits block you; purchases credit this account directly with no login. Trial accounts also get the claim_url for keeping the account. Not for creating an account (provision) or fetching LinkedIn data.",
        "x-input-examples": [
          {
            "summary": "Balance check",
            "value": {}
          }
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "usage envelope (schema_version 1)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage_envelope"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_INPUT | IDEMPOTENCY_KEY_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHORIZED | PROVISION_REQUIRED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "INSUFFICIENT_CREDITS | QUOTE_EXCEEDS_MAX_CREDITS",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "TRIAL_CAP_EXCEEDED | ORIGIN_FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "CONCURRENCY_LIMIT | RATE_LIMITED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "UPSTREAM_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "BUDGET_EXHAUSTED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/claim": {
      "post": {
        "operationId": "claim",
        "summary": "Claim a trial account",
        "description": "Attach an email (unverified at launch) to a trial account using the single-use token from a claim_url. The existing API key keeps working.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "claimed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email_verified": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/recover": {
      "post": {
        "operationId": "recover",
        "summary": "Request key recovery for a claimed account",
        "description": "Ask for a re-key link by email. Always returns the same 200 whether or not the email matches an account. Recovery email delivery is feature-flagged; while off, the response says so and points at manual recovery via hello@veezee.io.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rekey": {
      "post": {
        "operationId": "rekey",
        "summary": "Issue a new API key from a recovery token",
        "description": "Consume a single-use recovery token (1-hour TTL, from the recovery email): a new API key is issued and every old key is revoked in one atomic batch. The token is consumed first, so if rotation ever fails the token is spent and a fresh link must be requested. The new key is shown exactly once. Balance, plan, receipts, and in-flight calls are unchanged.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "re-keyed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string"
                    },
                    "api_key": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "invalid, expired, or already-used token"
          }
        }
      }
    },
    "/v1/checkout": {
      "post": {
        "operationId": "createCheckout",
        "summary": "Start a Checkout session",
        "description": "Create a Stripe Checkout session for a credit pack. Returns a hosted checkout_url to redirect the buyer to.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pack"
                ],
                "properties": {
                  "pack": {
                    "type": "string",
                    "enum": [
                      "flex",
                      "production"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checkout_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/portal": {
      "post": {
        "operationId": "createPortalSession",
        "summary": "Open the billing portal",
        "description": "Create a Stripe billing-portal session for self-serve subscription management and cancellation.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "portal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "portal_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key from provision (vz_trial_...) or a claimed account (vz_live_...). Trial keys may instead use the ?key= query fallback."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details with Veezee extensions.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "INVALID_INPUT",
              "NOT_FOUND",
              "UNAUTHORIZED",
              "PROVISION_REQUIRED",
              "INSUFFICIENT_CREDITS",
              "QUOTE_EXCEEDS_MAX_CREDITS",
              "IDEMPOTENCY_KEY_REQUIRED",
              "IDEMPOTENCY_KEY_REUSED",
              "CONCURRENCY_LIMIT",
              "RATE_LIMITED",
              "TRIAL_CAP_EXCEEDED",
              "BUDGET_EXHAUSTED",
              "UPSTREAM_UNAVAILABLE",
              "PAYLOAD_TOO_LARGE",
              "ORIGIN_FORBIDDEN",
              "INTERNAL"
            ]
          },
          "message": {
            "type": "string"
          },
          "param": {
            "type": "string"
          },
          "doc_url": {
            "type": "string"
          },
          "is_retriable": {
            "type": "boolean"
          },
          "retry_after_seconds": {
            "type": "number"
          },
          "valid_values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "claim_url": {
            "type": "string"
          },
          "provision_hint": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "doc_url",
          "is_retriable"
        ]
      },
      "provision_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "provision"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "account_id": {
                "type": "string"
              },
              "api_key": {
                "type": "string",
                "description": "Shown exactly once. Store it; send as 'Authorization: Bearer <key>'."
              },
              "plan": {
                "type": "string",
                "const": "trial"
              },
              "credits_granted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "claim_url": {
                "type": "string",
                "description": "Open to attach an email or payment and keep the account."
              },
              "upgrade_url": {
                "type": "string",
                "description": "Give this link to your human to add credits or upgrade; purchases credit THIS account with no login."
              },
              "instructions": {
                "type": "string",
                "description": "What to do next, written for the calling agent."
              }
            },
            "required": [
              "account_id",
              "api_key",
              "plan",
              "credits_granted",
              "claim_url",
              "upgrade_url",
              "instructions"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "url_resolution_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "url_resolution"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "input_url": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "person",
                  "company",
                  "post"
                ]
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Stable URN when resolvable."
              },
              "handle": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Slug (after /in/ or /company/) when present in the URL."
              },
              "canonical_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "input_url",
              "type",
              "id",
              "handle",
              "canonical_url"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "person_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "person"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "full_name": {
                "type": "string"
              },
              "first_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "headline": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "location": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Human-readable place, e.g. 'Seattle, Washington'."
                      },
                      "country_code": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "ISO 3166-1 alpha-2 when known."
                      }
                    },
                    "required": [
                      "name",
                      "country_code"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "about": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Only present when the 'about' section was requested."
              },
              "current_position": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "company_name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "company_handle": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "LinkedIn company slug."
                      },
                      "company_url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "company_urn": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "start_year": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "company_name",
                      "company_handle",
                      "company_url",
                      "company_urn",
                      "start_year"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "experience": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "company": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "handle": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "url": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "handle",
                            "url"
                          ],
                          "additionalProperties": false
                        },
                        "positions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "location": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_current": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "start_date": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "month": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 12
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "year": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": -9007199254740991,
                                            "maximum": 9007199254740991
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "month",
                                      "year"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Partial date as LinkedIn exposes it; month may be unknown."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "end_date": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "month": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 12
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "year": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": -9007199254740991,
                                            "maximum": 9007199254740991
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "month",
                                      "year"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Partial date as LinkedIn exposes it; month may be unknown."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "location",
                              "is_current",
                              "start_date",
                              "end_date"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "company",
                        "positions"
                      ],
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Only present when the 'experience' section was requested."
              },
              "education": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "institution": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "institution_url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "degree": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "start_year": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "end_year": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "institution",
                        "institution_url",
                        "degree",
                        "start_year",
                        "end_year"
                      ],
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Only present when the 'education' section was requested."
              },
              "skills": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "endorsement_count": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "endorsement_count"
                      ],
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Only present when the 'skills' section was requested."
              },
              "followers": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "connections": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_verified": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "image_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "type": "string",
                "description": "Canonical LinkedIn profile URL."
              }
            },
            "required": [
              "full_name",
              "first_name",
              "last_name",
              "headline",
              "location",
              "about",
              "current_position",
              "experience",
              "education",
              "skills",
              "followers",
              "connections",
              "is_verified",
              "image_url",
              "url"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {
              "urn": {
                "type": "string",
                "description": "Stable LinkedIn URN (urn:li:fsd_profile:...). Use this for repeat lookups."
              },
              "public_identifier": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Profile slug after /in/."
              },
              "is_influencer": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_creator": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_hiring": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_premium": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "open_to_messages": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pronoun": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "urn",
              "public_identifier",
              "is_influencer",
              "is_creator",
              "is_hiring",
              "has_premium",
              "open_to_messages",
              "pronoun"
            ],
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "people_search_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "people_search"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "followers": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_verified": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "image_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "urn": {
                      "type": "string"
                    },
                    "public_identifier": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_anonymous": {
                      "type": "boolean",
                      "description": "True when the profile is private: it exists but get_profile cannot dereference it. Do not retry."
                    }
                  },
                  "required": [
                    "name",
                    "position",
                    "location",
                    "followers",
                    "is_verified",
                    "image_url",
                    "url",
                    "urn",
                    "public_identifier",
                    "is_anonymous"
                  ],
                  "additionalProperties": false
                }
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Pass back to fetch the next page. Null when exhausted."
              },
              "next_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Ready-to-GET REST URL for the next page."
              },
              "total_matches": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "returned_count": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "truncation_hint": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Present when total_matches far exceeds returned results; says which filter to add."
              }
            },
            "required": [
              "results",
              "cursor",
              "next_url",
              "total_matches",
              "returned_count",
              "truncation_hint"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "company_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "company"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "website_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "industry": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "employee_count": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "employee_count_range": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "followers": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "founded_year": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "specialities": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "headquarters": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Human-readable place, e.g. 'Seattle, Washington'."
                      },
                      "country_code": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "ISO 3166-1 alpha-2 when known."
                      }
                    },
                    "required": [
                      "name",
                      "country_code"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "logo_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "type": "string",
                "description": "Canonical LinkedIn company URL."
              }
            },
            "required": [
              "name",
              "description",
              "website_url",
              "industry",
              "employee_count",
              "employee_count_range",
              "followers",
              "founded_year",
              "specialities",
              "headquarters",
              "logo_url",
              "url"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {
              "urn": {
                "type": "string",
                "description": "Stable LinkedIn URN (urn:li:fsd_company:...)."
              },
              "linkedin_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Numeric company id; accepted by search filters."
              },
              "public_identifier": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_type": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stock_symbol": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_verified": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "urn",
              "linkedin_id",
              "public_identifier",
              "organization_type",
              "stock_symbol",
              "is_verified"
            ],
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "posts_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "posts"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "urn": {
                      "type": "string"
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "text": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "ISO 8601."
                    },
                    "author": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "url": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "urn": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "url",
                            "urn"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "likes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "comments_count": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shares": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_repost": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "urn",
                    "url",
                    "text",
                    "created_at",
                    "author",
                    "likes",
                    "comments_count",
                    "shares",
                    "is_repost"
                  ],
                  "additionalProperties": false
                }
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "next_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "returned_count": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "author_type": {
                "type": "string",
                "enum": [
                  "person",
                  "company"
                ],
                "description": "What kind of entity the posts belong to."
              }
            },
            "required": [
              "results",
              "cursor",
              "next_url",
              "returned_count",
              "author_type"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      },
      "usage_envelope": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "const": "usage"
          },
          "platform": {
            "type": "string",
            "const": "linkedin"
          },
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schema_version": {
            "type": "string",
            "const": "1"
          },
          "common": {
            "type": "object",
            "properties": {
              "plan": {
                "type": "string",
                "enum": [
                  "trial",
                  "payg",
                  "flex",
                  "production"
                ]
              },
              "balance_remaining": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "realtime_ops_used": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "realtime_ops_limit": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Null means unlimited (paid plans)."
              },
              "concurrent_limit": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "recent_receipts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "receipt_id": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "credits_charged": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "receipt_id",
                    "tool",
                    "credits_charged",
                    "created_at"
                  ],
                  "additionalProperties": false
                },
                "description": "Up to the last 10 charges."
              },
              "claim_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Present on trial accounts: claim to keep the account and add credits."
              },
              "upgrade_url": {
                "type": "string",
                "description": "Give this link to your human to add credits or upgrade; purchases credit THIS account with no login."
              }
            },
            "required": [
              "plan",
              "balance_remaining",
              "realtime_ops_used",
              "realtime_ops_limit",
              "concurrent_limit",
              "recent_receipts",
              "claim_url",
              "upgrade_url"
            ],
            "additionalProperties": false
          },
          "platform_fields": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "freshness": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source_retrieved_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the data was fetched from the source. ISO 8601."
                  },
                  "served_at": {
                    "type": "string"
                  },
                  "cache_age_seconds": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freshness_requested": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime"
                    ]
                  },
                  "freshness_served": {
                    "type": "string",
                    "enum": [
                      "recent",
                      "realtime",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "source_retrieved_at",
                  "served_at",
                  "cache_age_seconds",
                  "freshness_requested",
                  "freshness_served"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_quoted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits_charged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "balance_remaining": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "credits_quoted",
              "credits_charged",
              "balance_remaining"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "platform",
          "canonical_url",
          "data_as_of",
          "schema_version",
          "common",
          "platform_fields",
          "freshness",
          "usage"
        ],
        "additionalProperties": false
      }
    }
  }
}
