{"openapi":"3.1.0","info":{"title":"PlatPhorm Site Registration API","description":"Comprehensive API for registering and managing sites in the PlatPhorm network","version":"1.0.0","contact":{"name":"PlatPhorm Support","url":"https://platphormnews.com/support","email":"support@platphormnews.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://register.platphormnews.com/api/v1","description":"Production server"},{"url":"https://sandbox.platphormnews.com/api/docs","description":"Sandbox API documentation"},{"url":"https://mcp.platphormnews.com/api/docs","description":"MCP API documentation"}],"paths":{"/registrations":{"get":{"summary":"List registrations","operationId":"listRegistrations","tags":["Registrations"],"security":[{"apiKey":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","active","suspended","cancelled"]}},{"name":"trust_level","in":"query","schema":{"type":"integer","minimum":0,"maximum":4}}],"responses":{"200":{"description":"List of registrations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationList"}}}},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"}}},"post":{"summary":"Create registration","operationId":"createRegistration","tags":["Registrations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRegistrationRequest"}}}},"responses":{"201":{"description":"Registration created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRegistrationResponse"}}}},"400":{"description":"Validation error"},"409":{"description":"Domain already registered"}}}},"/registrations/{id}":{"get":{"summary":"Get registration details","operationId":"getRegistration","tags":["Registrations"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Registration details"},"404":{"description":"Not found"}}},"patch":{"summary":"Update registration","operationId":"updateRegistration","tags":["Registrations"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Registration updated"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete registration","operationId":"deleteRegistration","tags":["Registrations"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Registration deleted"},"403":{"description":"Forbidden - admin required"},"404":{"description":"Not found"}}}},"/registrations/{id}/verify/dns":{"post":{"summary":"Verify DNS ownership","operationId":"verifyDNS","tags":["Verification"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"DNS verification result"},"404":{"description":"Not found"}}}},"/registrations/{id}/verify/email":{"post":{"summary":"Verify email","operationId":"verifyEmail","tags":["Verification"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"Email verification result"},"400":{"description":"Invalid token"},"404":{"description":"Not found"}}},"get":{"summary":"Resend verification email","operationId":"resendVerificationEmail","tags":["Verification"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Email sent"}}}},"/registrations/{id}/trust":{"get":{"summary":"Get trust assessment","operationId":"getTrustAssessment","tags":["Trust"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Trust assessment details"}}},"post":{"summary":"Request trust reassessment","operationId":"requestReassessment","tags":["Trust"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"New assessment result"},"429":{"description":"Rate limited"}}}},"/webhooks":{"get":{"summary":"List webhooks","operationId":"listWebhooks","tags":["Webhooks"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of webhooks"}}},"post":{"summary":"Create webhook","operationId":"createWebhook","tags":["Webhooks"],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Webhook created"}}}},"/events":{"get":{"summary":"List events (outbox)","operationId":"listEvents","tags":["Events"],"security":[{"apiKey":[]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","processed","failed"]}},{"name":"event_type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of events"}}},"post":{"summary":"Acknowledge events","operationId":"ackEvents","tags":["Events"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Events acknowledged"}}}},"/health":{"get":{"summary":"Health check","operationId":"healthCheck","tags":["System"],"responses":{"200":{"description":"Service healthy"},"503":{"description":"Service unhealthy"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for authentication"}},"schemas":{"CreateRegistrationRequest":{"type":"object","required":["site_name","site_domain","contact_email"],"properties":{"site_name":{"type":"string","minLength":1,"maxLength":255},"site_domain":{"type":"string","format":"hostname"},"site_description":{"type":"string","maxLength":1000},"contact_email":{"type":"string","format":"email"},"contact_name":{"type":"string","maxLength":255}}},"CreateRegistrationResponse":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Registration"},"api_key":{"type":"string","description":"API key (only shown once)"},"verification":{"type":"object"},"next_steps":{"type":"object"}}},"Registration":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"site_name":{"type":"string"},"site_domain":{"type":"string"},"status":{"type":"string","enum":["pending","active","suspended","cancelled"]},"trust_level":{"type":"integer","minimum":0,"maximum":4},"created_at":{"type":"string","format":"date-time"}}},"RegistrationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Registration"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}}}},"Error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}}}}},"tags":[{"name":"Registrations","description":"Site registration operations"},{"name":"Verification","description":"Domain and email verification"},{"name":"Trust","description":"Trust assessment and scoring"},{"name":"Webhooks","description":"Webhook management"},{"name":"Events","description":"Event outbox for integrations"},{"name":"System","description":"System operations"}]}