{"openapi":"3.0.0","info":{"title":"PG:AI Public API","version":"1.0.0","description":"Public API for accessing PG:AI account intelligence, contacts, territories, and more. All endpoints require API key authentication via the x-api-key header.","contact":{"name":"PG:AI Support","url":"https://www.getpg.ai"}},"servers":[{"url":"https://api.getpg.ai/public-api/v1","description":"Production"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication. Get your API key from the PG:AI dashboard under Settings > API Keys."}},"schemas":{"AccountsSearchResponse":{"type":"object","description":"Response from accounts search endpoint","properties":{"request":{"type":"object","description":"Request parameters used for the search","properties":{"industry":{"type":"string","nullable":true},"employee_size_category":{"type":"string","nullable":true},"revenue_category":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"public_company":{"type":"boolean"},"company_name":{"type":"string","nullable":true},"page":{"type":"integer"},"per_page":{"type":"integer"}}},"items":{"type":"array","description":"Array of company/account items","items":{"$ref":"#/components/schemas/AccountItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"AccountItem":{"type":"object","description":"Company/account item from search results","properties":{"id":{"type":"string","format":"uuid"},"company_name":{"type":"string"},"domain":{"type":"string"},"website":{"type":"string","format":"uri"},"public_company":{"type":"boolean"},"industry":{"type":"string","nullable":true},"employee_size_category":{"type":"string","nullable":true},"revenue_category":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"company_id":{"type":"string","format":"uuid"},"website_domain":{"type":"string"},"country_code":{"type":"string","nullable":true},"linkedin_url":{"type":"string","format":"uri","nullable":true},"hq_city":{"type":"string","nullable":true},"hq_state":{"type":"string","nullable":true},"hq_address":{"type":"string","nullable":true},"hq_postcode":{"type":"string","nullable":true},"hq_country_name":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"sector":{"type":"string","nullable":true},"revenue_range":{"type":"string","nullable":true},"employee_count_range":{"type":"string","nullable":true},"full_time_employees":{"type":"integer","nullable":true},"alternative_domains":{"type":"array","items":{"type":"string"},"nullable":true},"alternative_names":{"type":"array","items":{"type":"string"},"nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"stock_ticker":{"type":"string","nullable":true},"market_cap":{"type":"number","nullable":true},"stock_currency":{"type":"string","nullable":true},"stock_exchange_name":{"type":"string","nullable":true},"stock_exchange_symbol":{"type":"string","nullable":true}},"required":["id","company_id"]},"Company":{"type":"object","description":"Company information","properties":{"company_id":{"type":"string","format":"uuid"},"company_name":{"type":"string"},"website_domain":{"type":"string"},"public_company":{"type":"boolean"},"country_code":{"type":"string","nullable":true},"linkedin_url":{"type":"string","nullable":true},"hq_city":{"type":"string","nullable":true},"hq_state":{"type":"string","nullable":true},"hq_address":{"type":"string","nullable":true},"hq_postcode":{"type":"string","nullable":true},"hq_country_name":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"sector":{"type":"string","nullable":true},"industry":{"type":"string","nullable":true},"revenue_range":{"type":"string","nullable":true},"employee_count_range":{"type":"string","nullable":true},"full_time_employees":{"type":"integer","nullable":true},"alternative_domains":{"type":"array","items":{"type":"string"},"nullable":true},"alternative_names":{"type":"array","items":{"type":"string"},"nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"stock_ticker":{"type":"string","nullable":true},"market_cap":{"type":"number","nullable":true},"stock_currency":{"type":"string","nullable":true},"stock_exchange_name":{"type":"string","nullable":true},"stock_exchange_symbol":{"type":"string","nullable":true}},"required":["company_id"]},"ContactsListResponse":{"type":"object","description":"Paginated list of contacts","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}}}},"CompanyContactsResponse":{"type":"object","description":"Response containing company contacts","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["contacts","pagination"]},"CompanyContentResponse":{"type":"object","description":"Response containing company content","properties":{"contacts":{"type":"array","description":"Array of content items (note: field name is \"contacts\" in API)","items":{"$ref":"#/components/schemas/Content"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["contacts","pagination"]},"CompanyProfile":{"type":"object","description":"Customizable company profile with optional sections","properties":{"company_id":{"type":"string","format":"uuid"},"company_name":{"type":"string"},"website_domain":{"type":"string"},"hq_country_name":{"type":"string","nullable":true},"industry":{"type":"string","nullable":true},"revenue_range":{"type":"string","nullable":true},"employee_count_range":{"type":"string","nullable":true},"overview":{"type":"object","description":"Company overview section","additionalProperties":true},"divisions":{"type":"array","description":"Company divisions","items":{"type":"object","properties":{"division_name":{"type":"string"},"division_summary":{"type":"string"},"last_year_label":{"type":"string"},"last_year_financial_year_end":{"type":"string"},"last_year_revenue_gross":{"type":"number"},"last_year_gross_revenue_change":{"type":"string"},"year_before_label":{"type":"string"},"year_before_financial_year_end":{"type":"string"},"year_before_revenue_gross":{"type":"number"},"year_before_gross_revenue_change":{"type":"string"},"priorities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"description":{"type":"string"}}}},"challenges":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"description":{"type":"string"}}}},"digital_strategies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"description":{"type":"string"}}}},"key_people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"},"description":{"type":"string"}}}}}}},"key_executives":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"}}}},"geographical_operations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"description":{"type":"string"}}}},"swot_analysis":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["STRENGTH","WEAKNESS","OPPORTUNITY","THREAT"]},"description":{"type":"string"}}}},"strategic_priorities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}}}}},"digital_strategies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}}}}},"goals":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}}}}},"risks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}}}}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"website":{"type":"string","format":"uri"},"description":{"type":"string"}}}},"industry_insights":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"description":{"type":"string"}}}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_title":{"type":"string"},"fiscal_label":{"type":"string"},"period_end_date":{"type":"string","format":"date"},"gross_revenue":{"type":"number"},"gross_revenue_change":{"type":"string"},"earnings_call_new_strategies":{"type":"array","items":{"type":"object"}},"earnings_call_summary":{"type":"array","items":{"type":"object"}},"earnings_call_quotes":{"type":"array","items":{"type":"object"}},"event_new_strategies":{"type":"array","items":{"type":"object"}},"earnings_call_challenges":{"type":"array","items":{"type":"object"}},"digital_strategies":{"type":"array","items":{"type":"object"}}}}},"custom_insights":{"type":"array","items":{"type":"object"}},"insights_scores":{"type":"array","items":{"type":"object"}},"territory_custom_scores":{"type":"array","items":{"type":"object"}}},"required":["company_id"]},"Contact":{"type":"object","description":"Contact information","properties":{"id":{"type":"string","format":"uuid","description":"Contact ID"},"full_name":{"type":"string","description":"Full name"},"first_name":{"type":"string","description":"First name"},"last_name":{"type":"string","description":"Last name"},"current_job_title":{"type":"string","description":"Current job title"},"linkedin_url":{"type":"string","format":"uri","description":"LinkedIn profile URL"},"location":{"type":"string","description":"Location"},"country":{"type":"string","nullable":true,"description":"Country"},"country_code":{"type":"string","nullable":true,"description":"Country code"},"summary":{"type":"string","description":"Professional summary"},"image_url":{"type":"string","format":"uri","description":"Profile image URL"},"headline":{"type":"string","description":"Professional headline"},"emails":{"type":"array","items":{"type":"string"},"description":"Email addresses"},"phones":{"type":"array","items":{"type":"string"},"description":"Phone numbers"},"skills":{"type":"array","items":{"type":"string"},"description":"Skills"},"company":{"type":"object","properties":{"name":{"type":"string"},"linkedin_id":{"type":"string"}}},"experience":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"company":{"type":"string"},"company_linkedin_id":{"type":"string"},"title":{"type":"string"},"location":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time","nullable":true},"is_current":{"type":"boolean"},"description":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}}},"education":{"type":"array","items":{"type":"object","properties":{"degree":{"type":"string"},"field_of_study":{"type":"string","nullable":true},"school":{"type":"string"},"start_year":{"type":"integer"},"end_year":{"type":"integer"}}}},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"Last update timestamp"}},"required":["id"]},"Content":{"type":"object","description":"Content item","properties":{"content_id":{"type":"string","format":"uuid","description":"Content ID"},"company_id":{"type":"string","format":"uuid","description":"Associated company ID"},"content_type":{"type":"string","enum":["email","notes","call_script","document","value_pyramid","three_whys"],"description":"Content type"},"content_setting_id":{"type":"string","format":"uuid","nullable":true,"description":"Content setting ID"},"title":{"type":"string","description":"Content title"},"content":{"type":"string","description":"Content body/text (can be markdown)"},"ref_content_template_id":{"type":"string","format":"uuid","nullable":true,"description":"Reference content template ID"},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"Last update timestamp"}},"required":["content_id","company_id","content_type"]},"Error":{"type":"object","description":"Error response","properties":{"error":{"type":"string","description":"Error type or code"},"message":{"type":"string","description":"Human-readable error message"},"details":{"type":"object","description":"Additional error details","additionalProperties":true}},"required":["error"]},"OrganizationCredits":{"type":"object","description":"Organization credit information","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"credit_remaining":{"type":"object","properties":{"company_credits":{"type":"integer"},"content_credits":{"type":"integer"},"territory_credits":{"type":"integer"},"contact_credits":{"type":"integer"}}}},"required":["organization","credit_remaining"]},"Pagination":{"type":"object","description":"Pagination information","properties":{"page":{"type":"integer","description":"Current page number"},"per_page":{"type":"integer","description":"Items per page"},"total":{"type":"integer","description":"Total number of items","nullable":true},"total_items":{"type":"integer","description":"Total number of items (alternative field name)","nullable":true},"total_pages":{"type":"integer","description":"Total number of pages"},"has_next":{"type":"boolean","description":"Whether there is a next page","nullable":true},"has_previous":{"type":"boolean","description":"Whether there is a previous page","nullable":true}},"required":["page","per_page"]}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/companies/{company_id}":{"get":{"summary":"Get company by ID","description":"Retrieve detailed information about a specific company. Requires \"insights:read\" permission.","tags":["companies"],"responses":{"200":{"description":"Company found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"400":{"description":"Bad request - Company ID is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Insufficient permissions. Required: insights:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company ID (UUID)"}],"deprecated":false,"x-maturity":"ga"}},"/accounts":{"post":{"summary":"Search for accounts","description":"Search for accounts using various filters. No search filters required - empty body returns all results.","tags":["accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsSearchResponse"}}}},"400":{"description":"Input Error. Check the request payload for issues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Additional privileges are needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found. The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate Limited. Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"industry":{"type":"string","description":"Filter by industry"},"employee_size_category":{"type":"string","description":"Filter by employee size category"},"revenue_category":{"type":"string","description":"Filter by revenue category"},"country":{"type":"string","description":"Filter by country"},"company_name":{"type":"string","description":"Filter by company name"},"page":{"type":"integer","description":"Page number","default":0},"per_page":{"type":"integer","description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages.","default":25},"public_company":{"type":"boolean","description":"Filter by public company status"},"offset":{"type":"integer","description":"Offset for pagination","default":0}}}}}},"deprecated":false,"x-maturity":"ga"}},"/agent/sessions":{"get":{"summary":"[BETA] List workspace agent sessions","description":"List agent sessions for the workspace (user-scoped server-side).","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by status"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by session type"},{"name":"company_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by company UUID"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string"},"description":"Sort order"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"},"post":{"summary":"[BETA] Create workspace agent session","description":"Create a new agent session.","tags":["agent"],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Session title; defaults to Untitled if omitted"},"company_id":{"type":"string","description":"Optional company UUID (scoped session)"},"type":{"type":"string","description":"Session type; defaults to chat if missing or invalid","enum":["document","chat","plan","canvas_settings","email","workspace","project"]}}}}}},"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/agent/sessions":{"get":{"summary":"[BETA] List agent sessions for a company","description":"Retrieve agent sessions scoped to a company.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Input Error. Check the request payload for issues.","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"403":{"description":"Access denied. Additional privileges are needed.","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"404":{"description":"Not Found. The requested resource does not exist.","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"429":{"description":"Rate Limited. Too many requests.","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company ID (UUID)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Items per page"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by status"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by type"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string"},"description":"Sort order"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/profile":{"get":{"summary":"Get customizable company profile","description":"Retrieve a company profile, choosing which sections to return. Use `include` (comma-separated) to request specific sections — pass `full` to return everything. Use `exclude` (comma-separated) to drop sections from the response. Set `sources=true` to receive source citations alongside the profile content.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfile"}}}},"400":{"description":"Input Error. Check the request payload for issues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Additional privileges are needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found. The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate Limited. Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company ID (UUID)"},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["full","overview","key_executives","divisions","geographical_operations","swot_analysis","competitors","industry_insights","strategic_priorities","digital_strategies","risks","goals","insights_scores","events","value_pyramid","three_whys","discovery_questions","how_they_make_money","how_they_lose_money","custom_insights","employee_groups","favourite_technologies_count","territory_custom_scores","content"]}},"description":"Comma-separated list of sections to include. Pass `full` to return every section.","style":"form","explode":false,"example":"overview,key_executives,swot_analysis"},{"name":"exclude","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["full","overview","key_executives","divisions","geographical_operations","swot_analysis","competitors","industry_insights","strategic_priorities","digital_strategies","risks","goals","insights_scores","events","value_pyramid","three_whys","discovery_questions","how_they_make_money","how_they_lose_money","custom_insights","employee_groups","favourite_technologies_count","territory_custom_scores","content"]}},"description":"Comma-separated list of sections to omit from the response.","style":"form","explode":false,"example":"risks,competitors"},{"name":"sources","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When `true`, include source citations alongside the profile content.","example":true}],"deprecated":false,"x-maturity":"ga"}},"/contacts":{"get":{"summary":"[BETA] List contacts","description":"Retrieve a list of contacts with pagination.","tags":["contacts"],"responses":{"200":{"description":"Paginated list of contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Insufficient permissions. Required: contacts:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/organization/credits":{"get":{"summary":"Get organization credits","description":"Retrieve credit information for the authenticated organization.","tags":["organization"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCredits"}}}},"400":{"description":"Input Error. Check the request payload for issues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Additional privileges are needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found. The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate Limited. Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"deprecated":false,"x-maturity":"ga"}},"/territories":{"get":{"summary":"[BETA] List territories","description":"Retrieve a paginated list of territories for the authenticated organization.","tags":["territories"],"responses":{"200":{"description":"Success - paginated list of territories","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Required: territories:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number","example":1},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages.","example":25}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/territories/{territory_id}":{"get":{"summary":"[BETA] Get territory by ID","description":"Retrieve detailed information about a specific territory.","tags":["territories"],"responses":{"200":{"description":"Success - territory details","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Required: territories:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Territory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"territory_id","in":"path","required":true,"schema":{"type":"string"},"description":"UUID of the territory"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/search":{"get":{"summary":"[BETA] Unified semantic search","description":"Semantic search across the data PG:AI holds for your accounts — public filings and news, your uploaded materials, web pages, jobs, technologies, contacts, conversations, insights and more. Use `scope=organisation` to search every account tracked for your workspace, or `scope=companies` to restrict to a comma-separated list of `company_ids`. Returns a ranked `{ items, total, page, per_page }` envelope (organisation scope additionally includes `resolved_company_count`).","tags":["search"],"responses":{"200":{"description":"Success — `{ items, total, page, per_page }` (and optionally `resolved_company_count` for organisation scope)","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Missing or invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"scope","in":"query","required":true,"schema":{"type":"string","enum":["organisation","companies"]},"description":"Search scope: `organisation` (all tracked accounts for the org) or `companies` (explicit `company_ids`)."},{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query (minimum 1 character).","example":"Tesco"},{"name":"company_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Required when scope=companies: comma-separated company UUIDs."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page index for the response envelope."},{"name":"per_source","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages. Applied per vector source.","example":25},{"name":"date_from","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 lower bound on result date."},{"name":"date_to","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 upper bound on result date."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/graph":{"get":{"summary":"[BETA] Get company relevance graph","description":"Ranked relevance signals for a single company — recent material changes, leadership moves, funding, product launches, hiring trends, technology mentions and strategic shifts — drawn from PG:AI insights, public filings and news, web pages, jobs and technologies. Identical behaviour to `GET /companies/{company_id}/relevance`; this alias is retained for legacy clients. Returns `{ items, total, page, per_page }`.","tags":["companies"],"responses":{"200":{"description":"Success — `{ items, total, page, per_page }` envelope","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Invalid company ID format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Required: companies:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"UUID of the company"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Override the default relevance query."},{"name":"per_source","in":"query","required":false,"schema":{"type":"integer","default":10},"description":"Max hits per source (default 10, max 50)."},{"name":"date_from","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 lower bound on result date."},{"name":"date_to","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 upper bound on result date."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/contacts":{"post":{"summary":"Search company contacts","description":"Search and retrieve contacts associated with a specific company. Supports filtering by name, job title, location, and LinkedIn URL.","tags":["companies"],"responses":{"200":{"description":"Success - list of contacts with pagination","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Invalid company ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Required: contacts:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"UUID of the company"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","description":"Page number for pagination"},"per_page":{"type":"integer","description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},"name":{"type":"string","description":"Filter by contact name"},"job_title":{"type":"string","description":"Filter by job title"},"location":{"type":"string","description":"Filter by location"},"linkedin_url":{"type":"string","description":"Filter by LinkedIn URL"}}}}}},"deprecated":false,"x-maturity":"ga"}},"/companies":{"post":{"summary":"[BETA] Add a company (async enrichment)","description":"Submit a single company for discovery and enrichment. Returns 202 with a public_operation_id for polling via GET /operations/{public_operation_id}. Requires company_name, domain, or id.","tags":["companies"],"responses":{"202":{"description":"Accepted — enrichment queued","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"company_name":{"type":"string","description":"Company display name"},"domain":{"type":"string","description":"Company website domain"},"id":{"type":"string","description":"Existing PG:AI company UUID"},"external_id":{"type":"string","description":"External system id (requires source_system)"},"source_system":{"type":"string","description":"Source label for external_id"}}}}}},"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/canvas":{"get":{"summary":"[BETA] List canvases (workspace)","description":"Paginated list of canvas records for the organisation. Supports filters such as company_ids, contact_id, content_type, and date ranges.","tags":["canvas"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"},"post":{"summary":"[ALPHA] Generate canvas (async)","description":"Queue canvas generation from the request body. Returns 202 with operation tracking identifiers when applicable.","tags":["canvas"],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"x-badges":[{"name":"ALPHA","color":"#64748b"}],"deprecated":false,"x-maturity":"alpha"}},"/canvas/templates":{"get":{"summary":"List canvas templates","description":"Catalog of canvas templates with optional filter, category, produces, and search query.","tags":["canvas"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"Filter expression"},{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"Category"},{"name":"produces","in":"query","required":false,"schema":{"type":"string"},"description":"Output type filter"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search string"}],"deprecated":false,"x-maturity":"ga"}},"/companies/{company_id}/canvas":{"get":{"summary":"List canvases for a company","description":"Same as GET /canvas but scoped to a single company_id path parameter.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"deprecated":false,"x-maturity":"ga"}},"/events":{"get":{"summary":"[BETA] List monitoring events (workspace)","description":"Timeline of monitoring events with optional filters for type, source, time range, and pagination.","tags":["events"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},{"name":"event_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by event type"},{"name":"event_source","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by source"},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"description":"ISO lower bound"},{"name":"until","in":"query","required":false,"schema":{"type":"string"},"description":"ISO upper bound"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/events":{"get":{"summary":"[BETA] List monitoring events for a company","description":"Same as GET /events scoped to one company.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/alerts":{"get":{"summary":"List alerts (workspace)","description":"Paginated alerts with optional status, type, and time filters.","tags":["alerts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Alert status filter"},{"name":"alert_type","in":"query","required":false,"schema":{"type":"string"},"description":"Alert type filter"},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"description":"ISO lower bound"},{"name":"until","in":"query","required":false,"schema":{"type":"string"},"description":"ISO upper bound"}],"deprecated":false,"x-maturity":"ga"}},"/companies/{company_id}/alerts":{"get":{"summary":"List alerts for a company","description":"Alerts filtered to the given company.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"deprecated":false,"x-maturity":"ga"}},"/alerts/{alert_id}":{"patch":{"summary":"Update alert status","description":"Transition an alert to viewed, acknowledged, resolved, or dismissed.","tags":["alerts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string"},"description":"Alert UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"New status","enum":["viewed","acknowledged","resolved","dismissed"]}},"required":["status"]}}}},"deprecated":false,"x-maturity":"ga"}},"/contacts/search":{"post":{"summary":"[BETA] Search contacts (workspace)","description":"Cached workspace-wide contact search. Optional JSON filters in body; ?live=true is not supported on this route.","tags":["contacts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"202":{"description":"Accepted when live path used elsewhere","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/contacts/search":{"post":{"summary":"Search contacts for a company","description":"Per-company contact search. Append ?live=true to force a live refresh (returns 202 when async).","tags":["companies"],"responses":{"200":{"description":"Success (cached)","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"202":{"description":"Accepted (live refresh)","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"live","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]},"description":"Set to true for live refresh"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"deprecated":false,"x-maturity":"ga"}},"/contacts/{contact_id}/enrich/contact_info":{"post":{"summary":"[BETA] Enrich contact (phone/email)","description":"Queue Airscale-style contact info enrichment. Returns 202 when accepted.","tags":["contacts"],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"},"description":"Contact UUID"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/jobs":{"get":{"summary":"List job postings (workspace)","description":"Employment listings with filters. ?live=true is not supported without a company scope.","tags":["jobs"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"live=true not allowed workspace-wide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search query"},{"name":"job_title","in":"query","required":false,"schema":{"type":"string"},"description":"Title filter"},{"name":"country_code","in":"query","required":false,"schema":{"type":"string"},"description":"Country code"}],"deprecated":false,"x-maturity":"ga"}},"/companies/{company_id}/jobs":{"get":{"summary":"List job postings for a company","description":"Job postings scoped to a company. Supports ?live=true for refresh.","tags":["companies"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"live","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]},"description":"Live refresh"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages."}],"deprecated":false,"x-maturity":"ga"}},"/filters":{"get":{"summary":"[BETA] Get filter metadata","description":"Returns filter definitions for the requested entity type (accounts, contacts, content, or jobs).","tags":["filters"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Missing or invalid type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["accounts","contacts","content","jobs"]},"description":"Entity type"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/operations/{public_operation_id}":{"get":{"summary":"[BETA] Poll async operation status","description":"Poll enrichment or bulk jobs using the public_operation_id (op_*) returned from async POST endpoints.","tags":["operations"],"responses":{"200":{"description":"Success — may include Retry-When queued/running","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Invalid operation id format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"public_operation_id","in":"path","required":true,"schema":{"type":"string"},"description":"Operation id such as op_abc123"}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}},"/companies/{company_id}/search":{"get":{"summary":"[ALPHA] Search documents about a company","description":"Semantic search across the documents PG:AI holds for this company — public sources (earnings call transcripts, news articles and other public filings) and any files your team has uploaded and tagged to the same company. Each result includes a `source_type` of either `public_doc` or `uploaded_doc`. The response carries a single top-level `company` object (`{ id, name, domain }`) for the path company; individual items do not repeat it. Use `GET /companies/{company_id}/relevance` for a wider relevance feed that also includes web pages, jobs and technologies.","tags":["companies"],"responses":{"200":{"description":"Success — `{ items, total, page, per_page, company }`. Top-level `company` is `{ id, name, domain }` for the path company (items omit per-row `company`). Each item has `source_type` (`public_doc` | `uploaded_doc`), `id`, `title`, `text`, optional `event` / `file` blocks as for other search responses.","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Search / data service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number."},{"name":"per_source","in":"query","required":false,"schema":{"type":"integer","default":25},"description":"Page size. Default 25, maximum 50 on all list endpoints. Omit to use the default; increase up to 50 only if you need larger pages. Applied per source."},{"name":"date_from","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 lower bound on result date."},{"name":"date_to","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 upper bound on result date."}],"x-badges":[{"name":"ALPHA","color":"#64748b"}],"deprecated":false,"x-maturity":"alpha"}},"/companies/{company_id}/relevance":{"get":{"summary":"[BETA] Get company relevance","description":"Ranked relevance signals for a single company — recent material changes, leadership moves, funding, product launches, hiring trends, technology mentions and strategic shifts — drawn from PG:AI insights, public filings and news, web pages, jobs and technologies. By default uses a material-changes query; pass `q` to override. Returns `{ items, total, page, per_page }`. `GET /companies/{company_id}/graph` is a legacy alias for this endpoint.","tags":["companies"],"responses":{"200":{"description":"Success — `{ items, total, page, per_page }` envelope","content":{"application/json":{"schema":{"type":"object","description":"Response data"}}}},"400":{"description":"Invalid company ID or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied. Required: companies:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"},"description":"Company UUID"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Override the default relevance query."},{"name":"per_source","in":"query","required":false,"schema":{"type":"integer","default":10},"description":"Max hits per source (default 10, max 50)."},{"name":"date_from","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 lower bound."},{"name":"date_to","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 upper bound."}],"x-badges":[{"name":"BETA","color":"#f59e0b"}],"deprecated":false,"x-maturity":"beta"}}}}