{"openapi":"3.1.0","info":{"title":"Rayon Insurance API","version":"1.0.0","summary":"Read Rayon's insurance guides and firm details, and file a request for a visitor.","description":"Public and read-only, except POST /requests, which files the same request as the forms on https://rayoninsure.com. No authentication. Rayon Insurance is a licensed insurance producer in Illinois. Coverage depends on each policy’s terms, conditions and exclusions. Versioning: the version is in the path (/api/v1); fields are only added within v1, and a breaking change gets /api/v2 with at least 90 days' notice in the Deprecation and Sunset headers on v1. See https://rayoninsure.com/developers.","contact":{"name":"Rayon Insurance","email":"siddansh@rayoninsure.com","url":"https://rayoninsure.com/developers"}},"servers":[{"url":"https://rayoninsure.com/api/v1"}],"externalDocs":{"url":"https://rayoninsure.com/developers"},"paths":{"/guides":{"get":{"operationId":"searchGuides","summary":"Search the insurance guides","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Words that must all appear. Leave out to list every guide."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Matching guides","content":{"application/json":{"schema":{"type":"object","properties":{"guides":{"type":"array","items":{"$ref":"#/components/schemas/Guide"}}},"required":["guides"]}}}},"400":{"description":"limit is out of range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/guides/{slug}":{"get":{"operationId":"getGuide","summary":"Read one guide, with its full text as Markdown","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The guide","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Guide"},{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"]}]}}}},"404":{"description":"No guide has this slug","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/firm":{"get":{"operationId":"getFirmDetails","summary":"Who Rayon Insurance is, where it is licensed and how to reach it","responses":{"200":{"description":"Firm details","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/forms":{"get":{"operationId":"listRequestForms","summary":"Each kind of request and the page where a visitor fills it in","responses":{"200":{"description":"Request forms","content":{"application/json":{"schema":{"type":"object","properties":{"forms":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"for":{"type":"string"},"url":{"type":"string","format":"uri"}}}}}}}}}}}},"/requests":{"post":{"operationId":"submitRequest","summary":"File a request for a visitor who asked for it","description":"Same checks and limits as the site's forms, including five requests per email address per rolling 24 hours, reported in the RateLimit headers. Send an Idempotency-Key so a retry never files the request twice. A person replies by email within two business days. Nothing is bound or quoted by this call.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"A unique value, such as a UUID, for this request. Retrying with the same key and email within 24 hours returns 201 with Idempotent-Replayed: true and files nothing new."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["operators","brokers","integrators","sellers","contract_review","agency_servicing"],"description":"operators: A company running robots wants its insurance and robot contracts reviewed, with quotes for any gap. brokers: A retail broker wants a placement partner for a client deploying robots. integrators: A robotics integrator wants the customer-side insurance checklist for its SOW. sellers: A marketplace seller needs to meet a seller agreement's insurance requirement. contract_review: Send a contract (RaaS agreement, SOW, site-access agreement) to be read against the company's insurance. agency_servicing: A commercial insurance brokerage wants help with servicing work (Rayon Ops)."},"name":{"type":"string","maxLength":120,"description":"The visitor's full name."},"email":{"type":"string","format":"email","maxLength":200,"description":"The visitor's work email. The reply goes here."},"company":{"type":"string","maxLength":200,"description":"The company's legal name. Required for contract_review."},"phone":{"type":"string","maxLength":40,"description":"Optional phone number."},"message":{"type":"string","maxLength":1000,"description":"What the visitor needs, in their words: the contract, robots, site, deadline or question."},"visitor_confirmed":{"type":"boolean","const":true,"description":"Must be true. Set it only after the visitor has seen what will be sent, agreed to be contacted by Rayon Insurance and to its privacy notice (https://rayoninsure.com/privacy), and asked you to send it."}},"required":["kind","name","email","visitor_confirmed"],"additionalProperties":false}}}},"responses":{"201":{"description":"Received","headers":{"RateLimit-Policy":{"description":"The limit: \"email\";q=5;w=86400 is five requests per email address per rolling 24 hours.","schema":{"type":"string"}},"RateLimit":{"description":"What is left for this email address: \"email\";r=<remaining>;t=<seconds>.","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"true when this was a retry of a request already filed","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"received"},"message":{"type":"string"}},"required":["status","message"]}}}},"400":{"description":"A field is missing or not valid, or visitor_confirmed is not true","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The Idempotency-Key was already used for a different request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests from this email address today","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"RateLimit-Policy":{"description":"The limit: \"email\";q=5;w=86400 is five requests per email address per rolling 24 hours.","schema":{"type":"string"}},"RateLimit":{"description":"What is left for this email address: \"email\";r=<remaining>;t=<seconds>.","schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"Something went wrong on our side","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Requests cannot be saved right now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Guide":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"answer":{"type":"string","description":"Two or three sentences that answer the title."},"audience":{"type":"string","enum":["contractors","brokerages"]},"reviewed":{"type":"string","format":"date"},"url":{"type":"string","format":"uri"},"markdown_url":{"type":"string","format":"uri"}},"required":["slug","title","answer","audience","reviewed","url","markdown_url"]},"Problem":{"type":"object","description":"RFC 9457 problem details.","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","enum":["invalid_request","not_found","idempotency_conflict","rate_limited","server_error","unavailable"]}},"required":["type","title","status","detail","code"]}}}}