{"openapi":"3.1.0","info":{"title":"Platinux API","version":"1.0.0","description":"Score companies by buying intent, look up company details and find the company behind an email, with one API key.\n\nFull documentation: https://docs.platinux.net","contact":{"name":"Platinux Labs Pvt Ltd","url":"https://platinux.net"}},"servers":[{"url":"https://mmkuffhlzytnmgraagbp.supabase.co/functions/v1"}],"security":[{"bearer":[]},{"apiKey":[]}],"externalDocs":{"url":"https://docs.platinux.net"},"paths":{"/score/domain":{"post":{"operationId":"score_domain","summary":"Score from a domain (10 credits; 0 if not scored)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain","template_id"],"properties":{"domain":{"type":"string"},"template_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"No company found / temporary email: nothing scored, 0 credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"202":{"description":"Scoring started; check with GET ?job_id=","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"400":{"description":"Wrong input for this path (invalid_domain + reason, invalid_email, invalid_url) or invalid_input","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":"template_not_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_unavailable (free)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_domain_job","summary":"Check a score job","tags":["Scoring"],"parameters":[{"name":"job_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"job_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/score/domain/bulk":{"post":{"operationId":"score_domain_bulk","summary":"Score up to 1,000 domains (one score per company)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","inputs"],"properties":{"template_id":{"type":"string","format":"uuid"},"inputs":{"type":"array","maxItems":1000,"items":{"type":"string"}}}}}}},"responses":{"202":{"description":"List started","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_input or too_many_inputs","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"}}}},"409":{"description":"batch_in_progress or template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_domain_bulk_check","summary":"Check the list (100 results per page)","tags":["Scoring"],"parameters":[{"name":"batch_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Complete","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"batch_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/score/email":{"post":{"operationId":"score_email","summary":"Score from a email (10 (work or company email) or 20 (generic email such as Gmail or Outlook) credits; 0 if not scored)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","template_id"],"properties":{"email":{"type":"string"},"template_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"No company found / temporary email: nothing scored, 0 credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"202":{"description":"Scoring started; check with GET ?job_id=","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"400":{"description":"Wrong input for this path (invalid_domain + reason, invalid_email, invalid_url) or invalid_input","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":"template_not_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_unavailable (free)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_email_job","summary":"Check a score job","tags":["Scoring"],"parameters":[{"name":"job_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"job_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/score/email/bulk":{"post":{"operationId":"score_email_bulk","summary":"Score up to 1,000 emails (one score per company)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","inputs"],"properties":{"template_id":{"type":"string","format":"uuid"},"inputs":{"type":"array","maxItems":1000,"items":{"type":"string"}}}}}}},"responses":{"202":{"description":"List started","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_input or too_many_inputs","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"}}}},"409":{"description":"batch_in_progress or template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_email_bulk_check","summary":"Check the list (100 results per page)","tags":["Scoring"],"parameters":[{"name":"batch_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Complete","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"batch_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/score/social":{"post":{"operationId":"score_social","summary":"Score from a LinkedIn company or person URL (10 credits; 0 if not scored)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","template_id"],"properties":{"url":{"type":"string"},"template_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"No company found / temporary email: nothing scored, 0 credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"202":{"description":"Scoring started; check with GET ?job_id=","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAny"}}}},"400":{"description":"Wrong input for this path (invalid_domain + reason, invalid_email, invalid_url) or invalid_input","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":"template_not_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_unavailable (free)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_social_job","summary":"Check a score job","tags":["Scoring"],"parameters":[{"name":"job_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreJob"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"job_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/score/social/bulk":{"post":{"operationId":"score_social_bulk","summary":"Score up to 1,000 LinkedIn URLs (one score per company)","tags":["Scoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","inputs"],"properties":{"template_id":{"type":"string","format":"uuid"},"inputs":{"type":"array","maxItems":1000,"items":{"type":"string"}}}}}}},"responses":{"202":{"description":"List started","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_input or too_many_inputs","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"}}}},"409":{"description":"batch_in_progress or template_not_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"score_social_bulk_check","summary":"Check the list (100 results per page)","tags":["Scoring"],"parameters":[{"name":"batch_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Complete","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"batch_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-templates":{"get":{"operationId":"listTemplates","summary":"List your scoring templates","tags":["Templates"],"responses":{"200":{"description":"Your templates, live one first","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}}}},"401":{"description":"Missing, wrong or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-company":{"post":{"operationId":"companyDetails","summary":"Company details for one domain (1 credit when found)","tags":["Company"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","example":"stripe.com"}}}}}},"responses":{"200":{"description":"Found or not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResult"}}}},"400":{"description":"invalid_input or invalid_domain","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"}}}},"502":{"description":"provider_unavailable (nothing charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-company-bulk":{"post":{"operationId":"companyBulk","summary":"Company details for up to 1,000 domains","tags":["Company"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domains"],"properties":{"domains":{"type":"array","maxItems":1000,"items":{"type":"string"}}}}}}},"responses":{"200":{"description":"100 domains or fewer: results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBatch"}}}},"202":{"description":"101 to 1,000 domains: started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBatch"}}}},"400":{"description":"invalid_input, invalid_domain or too_many_domains","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"}}}},"502":{"description":"provider_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getCompanyBatch","summary":"Collect a company batch (100 results per page)","tags":["Company"],"parameters":[{"name":"batch_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Complete or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBatch"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBatch"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"batch_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-email-domain":{"post":{"operationId":"emailDomain","summary":"Company domain behind an email (0 or 10 credits)","tags":["Email"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"}}}},"400":{"description":"invalid_email","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"}}}},"502":{"description":"provider_unavailable (nothing charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-email-domain-bulk":{"post":{"operationId":"emailDomainBulk","summary":"Company domains for up to 1,000 emails (10 per new generic email found)","tags":["Email"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","maxItems":1000,"items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Everything answered at once","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"New generic emails being looked up; check with GET","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_input or too_many_emails","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"}}}}}},"get":{"operationId":"getEmailDomainBatch","summary":"Check the lookup (100 results per page)","tags":["Email"],"parameters":[{"name":"batch_id","in":"query","required":true,"description":"From the POST response","schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Complete","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Still processing","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"batch_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your API key: plx_live_ followed by 32 characters"},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","enum":["empty","invalid_format","invalid_tld","email","ip_address","file_name","social_media","messaging","common_site","email_provider","link_shortener","marketplace","free_host","unregistered","no_website","parked","coming_soon","already_processing","none_valid"],"description":"invalid_domain only"}}},"Template":{"type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"is_live":{"type":"boolean"},"scoreable":{"type":"boolean"}}},"ScoreJob":{"type":"object","properties":{"status":{"type":"string","enum":["processing","complete","partial"]},"job_id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"template_id":{"type":"string","format":"uuid"},"score":{"type":"integer","minimum":0,"maximum":100},"scored_at":{"type":"string","format":"date-time"},"credits_charged":{"type":"integer"},"check_after_seconds":{"type":"integer"}}},"Rejected":{"type":"object","properties":{"domain":{"type":"string"},"reason":{"type":"string","enum":["empty","invalid_format","invalid_tld","email","ip_address","file_name","social_media","messaging","common_site","email_provider","link_shortener","marketplace","free_host","unregistered","no_website","parked","coming_soon","already_processing","none_valid"]}}},"Company":{"type":"object","description":"Any field may be null","properties":{"name":{"type":"string"},"website":{"type":"string"},"description":{"type":"string"},"slogan":{"type":"string"},"industry":{"type":"string"},"specialties":{"type":"array","items":{"type":"string"}},"company_type":{"type":"string"},"employee_count":{"type":"integer"},"headcount_range":{"type":"string"},"employee_growth":{"type":"array","items":{}},"revenue_range":{"type":"object"},"founded_year":{"type":"integer"},"location":{"type":"object"},"phone":{"type":"string"},"logo_url":{"type":"string"},"linkedin_url":{"type":"string"},"linkedin_id":{"type":"string"}}},"CompanyResult":{"type":"object","properties":{"status":{"type":"string","enum":["found","not_found"]},"domain":{"type":"string"},"company":{"oneOf":[{"$ref":"#/components/schemas/Company"},{"type":"null"}]},"domain_match":{"type":["boolean","null"]},"source":{"type":"string"},"fetched_at":{"type":"string","format":"date-time"},"cached":{"type":"boolean"},"credits_charged":{"type":"integer"}}},"CompanyBatch":{"type":"object","properties":{"status":{"type":"string","enum":["processing","complete","failed"]},"batch_id":{"type":"string"},"total":{"type":"integer"},"found":{"type":"integer"},"not_found":{"type":"integer"},"credits_charged":{"type":"integer"},"rejected":{"type":"array","items":{"$ref":"#/components/schemas/Rejected"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/CompanyResult"}},"page":{"type":"integer"},"pages":{"type":"integer"}}},"ScoreAny":{"type":"object","properties":{"status":{"type":"string","enum":["processing","not_found","temporary_email"]},"job_id":{"type":"string","format":"uuid"},"input":{"type":"string"},"input_type":{"type":"string","enum":["domain","linkedin_company","linkedin_person","work_email","personal_email","temporary_email"],"description":"personal_email = a generic email provider such as Gmail or Outlook"},"domain":{"type":["string","null"]},"template_id":{"type":"string","format":"uuid"},"score":{"type":["integer","null"]},"check_after_seconds":{"type":"integer"},"credits_charged":{"type":"integer"}}},"EmailDomain":{"type":"object","properties":{"status":{"type":"string","enum":["found","not_found","temporary_email"]},"type":{"type":"string","enum":["work","personal","temporary"],"description":"personal = a generic email provider such as Gmail or Outlook"},"email":{"type":"string"},"domain":{"type":["string","null"]},"cached":{"type":"boolean"},"message":{"type":"string"},"credits_charged":{"type":"integer"}}}}}}