{"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"info":{"description":"API for third-party partners to create and manage insurance prospects through the SayRhino platform.","title":"SayRhino Partner API","version":"v2"},"openapi":"3.0.3","paths":{"/partners/{owner_slug}/prospects":{"post":{"parameters":[{"example":"application/json","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":"shelby-green-ii-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"prospect":{"birthdate":"1990-05-15","citizenship":"us_or_green_card","deposit_amount_cents":250000,"education_level":"bachelor_degree","email":"newprospect@example.com","employment_status":"employed","first_name":"John","has_ssn":true,"last_name":"Doe","lease_end_date":"2026-01-31","lease_start_date":"2025-02-01","monthly_rent_cents":200000,"phone":"5559876543","pms_property_id":"prop-123","pms_prospect_id":"prospect-789","pms_type":"yardi","pms_unit_id":"unit-456","screening_result":"approved","social_security_number":"100010001","source":"vero","source_prospect_id":"new-prospect-123","terms_accepted_at":"2025-01-15T10:30:00Z","yearly_income":75000}},"schema":{"properties":{"prospect":{"properties":{"birthdate":{"type":"string"},"citizenship":{"enum":["us_or_green_card","non_us"],"type":"string"},"deposit_amount_cents":{"type":"integer"},"education_level":{"enum":["high_school","associate_degree","bachelor_degree","masters_degree","doctoral_degree"],"type":"string"},"email":{"type":"string"},"employment_status":{"enum":["full_time_student","employed","self_employed","unemployed","retired","corporation"],"type":"string"},"first_name":{"type":"string"},"has_ssn":{"type":"boolean"},"last_name":{"type":"string"},"lease_end_date":{"type":"string"},"lease_start_date":{"type":"string"},"monthly_rent_cents":{"type":"integer"},"phone":{"type":"string"},"pms_property_id":{"type":"string"},"pms_prospect_id":{"type":"string"},"pms_type":{"enum":["yardi"],"type":"string"},"pms_unit_id":{"type":"string"},"screening_result":{"enum":["approved","conditional","denied"],"type":"string"},"social_security_number":{"type":"string"},"source":{"type":"string"},"source_prospect_id":{"type":"string"},"terms_accepted_at":{"format":"date-time","type":"string"},"yearly_income":{"type":"integer"}},"required":["source","source_prospect_id"],"type":"object"}},"required":["prospect"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"prospect":{"application_submitted":false,"birthdate":"1990-05-15","deposit_amount_cents":250000,"effective_coverage_amount_cents":250000,"email":"newprospect@example.com","employment_status":"employed","enrollment_url":null,"first_name":"John","has_ssn":true,"id":43,"last_name":"Doe","latest_coverage":null,"lease_end_date":"2026-01-31","lease_start_date":"2025-02-01","monthly_rent_cents":200000,"offered_products":[{"monthly_enrollment_url":null,"monthly_premium_cents":1000,"product_type":"security_deposit_insurance","upfront_enrollment_url":null,"upfront_premium_cents":10000},{"cash_deposit_amount_cents":100000,"enrollment_url":null,"product_type":"cash_deposit"}],"percent_savings":99.6,"phone":"5559876543","pms_property_id":"prop-123","pms_prospect_id":"prospect-789","pms_type":"yardi","pms_unit_id":"unit-456","screening_result":"approved","source":"vero","source_prospect_id":"new-prospect-123","status":"processing","yearly_income":75000},"status_code":200},"schema":{"properties":{"prospect":{"properties":{"application_submitted":{"type":"boolean"},"birthdate":{"nullable":true,"type":"string"},"deposit_amount_cents":{"nullable":true,"type":"integer"},"effective_coverage_amount_cents":{"nullable":true,"type":"integer"},"email":{"nullable":true,"type":"string"},"employment_status":{"enum":["full_time_student","employed","self_employed","unemployed","retired","corporation"],"nullable":true,"type":"string"},"enrollment_url":{"nullable":true},"first_name":{"type":"string"},"has_ssn":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"last_name":{"nullable":true,"type":"string"},"latest_coverage":{"nullable":true},"lease_end_date":{"nullable":true,"type":"string"},"lease_start_date":{"nullable":true,"type":"string"},"monthly_rent_cents":{"nullable":true,"type":"integer"},"offered_products":{"items":{"properties":{"cash_deposit_amount_cents":{"nullable":true,"type":"integer"},"enrollment_url":{"nullable":true},"monthly_enrollment_url":{"nullable":true},"monthly_premium_cents":{"nullable":true,"type":"integer"},"product_type":{"enum":["security_deposit_insurance","cash_deposit"],"type":"string"},"upfront_enrollment_url":{"nullable":true},"upfront_premium_cents":{"nullable":true,"type":"integer"}},"required":["product_type"],"type":"object"},"type":"array"},"percent_savings":{"format":"float","nullable":true,"type":"number"},"phone":{"nullable":true,"type":"string"},"pms_property_id":{"nullable":true,"type":"string"},"pms_prospect_id":{"nullable":true,"type":"string"},"pms_type":{"enum":["yardi"],"nullable":true,"type":"string"},"pms_unit_id":{"nullable":true,"type":"string"},"screening_result":{"enum":["approved","conditional","denied"],"nullable":true,"type":"string"},"source":{"type":"string"},"source_prospect_id":{"type":"string"},"status":{"enum":["incomplete","processing","ready","error"],"type":"string"},"yearly_income":{"nullable":true,"type":"integer"}},"required":["id","source","source_prospect_id","email","phone","first_name","last_name","lease_start_date","lease_end_date","screening_result","monthly_rent_cents","birthdate","employment_status","yearly_income","has_ssn","pms_type","pms_property_id","pms_unit_id","pms_prospect_id","deposit_amount_cents","effective_coverage_amount_cents","percent_savings","enrollment_url","offered_products","status","application_submitted","latest_coverage"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","prospect"],"type":"object"}}},"description":"Submit prospect data for eligibility evaluation. If a prospect with the same source + source_prospect_id already exists for the property owner, it will be updated (upsert). Returns the prospect with current eligibility status and offered products.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"201":{"content":{"application/json":{"example":{"prospect":{"application_submitted":false,"birthdate":"1990-05-15","deposit_amount_cents":250000,"effective_coverage_amount_cents":250000,"email":"newprospect@example.com","employment_status":"employed","enrollment_url":null,"first_name":"John","has_ssn":true,"id":33,"last_name":"Doe","latest_coverage":null,"lease_end_date":"2026-01-31","lease_start_date":"2025-02-01","monthly_rent_cents":200000,"offered_products":[],"percent_savings":null,"phone":"5559876543","pms_property_id":"prop-123","pms_prospect_id":"prospect-789","pms_type":"yardi","pms_unit_id":"unit-456","screening_result":"approved","source":"vero","source_prospect_id":"new-prospect-123","status":"processing","yearly_income":75000},"status_code":201},"schema":{"properties":{"prospect":{"properties":{"application_submitted":{"type":"boolean"},"birthdate":{"type":"string"},"deposit_amount_cents":{"type":"integer"},"effective_coverage_amount_cents":{"nullable":true,"type":"integer"},"email":{"type":"string"},"employment_status":{"enum":["full_time_student","employed","self_employed","unemployed","retired","corporation"],"type":"string"},"enrollment_url":{"nullable":true},"first_name":{"type":"string"},"has_ssn":{"type":"boolean"},"id":{"type":"integer"},"last_name":{"type":"string"},"latest_coverage":{"nullable":true},"lease_end_date":{"type":"string"},"lease_start_date":{"type":"string"},"monthly_rent_cents":{"type":"integer"},"offered_products":{"items":{},"type":"array"},"percent_savings":{"nullable":true},"phone":{"type":"string"},"pms_property_id":{"type":"string"},"pms_prospect_id":{"type":"string"},"pms_type":{"enum":["yardi"],"type":"string"},"pms_unit_id":{"type":"string"},"screening_result":{"enum":["approved","conditional","denied"],"type":"string"},"source":{"type":"string"},"source_prospect_id":{"type":"string"},"status":{"enum":["incomplete","processing","ready","error"],"type":"string"},"yearly_income":{"type":"integer"}},"required":["id","source","source_prospect_id","email","phone","first_name","last_name","lease_start_date","lease_end_date","screening_result","monthly_rent_cents","birthdate","employment_status","yearly_income","has_ssn","pms_type","pms_property_id","pms_unit_id","pms_prospect_id","deposit_amount_cents","effective_coverage_amount_cents","percent_savings","enrollment_url","offered_products","status","application_submitted","latest_coverage"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","prospect"],"type":"object"}}},"description":"Submit prospect data for eligibility evaluation. If a prospect with the same source + source_prospect_id already exists for the property owner, it will be updated (upsert). Returns the prospect with current eligibility status and offered products.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"Submit prospect data for eligibility evaluation. If a prospect with the same source + source_prospect_id already exists for the property owner, it will be updated (upsert). Returns the prospect with current eligibility status and offered products."},"404":{"description":"Submit prospect data for eligibility evaluation. If a prospect with the same source + source_prospect_id already exists for the property owner, it will be updated (upsert). Returns the prospect with current eligibility status and offered products."},"422":{"content":{"application/json":{"example":{"error":"Prospect invalid.","prospect":{"enrollment_source":"Enrollment source must exist","source":"Source is not included in the list"},"status_code":422},"schema":{"properties":{"error":{"type":"string"},"prospect":{"properties":{"enrollment_source":{"type":"string"},"source":{"type":"string"}},"required":["source"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","error","prospect"],"type":"object"}}},"description":"Submit prospect data for eligibility evaluation. If a prospect with the same source + source_prospect_id already exists for the property owner, it will be updated (upsert). Returns the prospect with current eligibility status and offered products.","headers":{"Content-Type":{"schema":{"type":"string"}}}}},"summary":"Create or update a prospect","tags":["Prospects"]}},"/partners/{owner_slug}/prospects/{source}/{source_prospect_id}":{"get":{"parameters":[{"example":"denita-strosin-esq-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}},{"example":"vero","in":"path","name":"source","required":true,"schema":{"type":"string"}},{"example":"3pp-1","in":"path","name":"source_prospect_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"prospect":{"application_submitted":false,"birthdate":"1990-01-01","deposit_amount_cents":300000,"effective_coverage_amount_cents":300000,"email":"test1@example.com","employment_status":"employed","enrollment_url":null,"first_name":"Robbie","has_ssn":true,"id":19,"last_name":"Rhino","latest_coverage":{"cadence":"upfront","coverage_amount_cents":200000,"coverage_end_date":"2026-01-31","coverage_start_date":"2025-02-01","document_url":"https://www.sayrhino.com/policies/123/documents","product_payment_cents":15000,"type":"security_deposit_insurance"},"lease_end_date":"2018-02-03","lease_start_date":"2017-02-10","monthly_rent_cents":150000,"offered_products":[],"percent_savings":null,"phone":"5551234567","pms_property_id":"prop-123","pms_prospect_id":"prospect-789","pms_type":"yardi","pms_unit_id":"unit-456","screening_result":"approved","source":"vero","source_prospect_id":"3pp-1","status":"processing","yearly_income":75000},"status_code":200},"schema":{"properties":{"prospect":{"properties":{"application_submitted":{"type":"boolean"},"birthdate":{"type":"string"},"deposit_amount_cents":{"type":"integer"},"effective_coverage_amount_cents":{"nullable":true,"type":"integer"},"email":{"type":"string"},"employment_status":{"enum":["full_time_student","employed","self_employed","unemployed","retired","corporation"],"type":"string"},"enrollment_url":{"nullable":true},"first_name":{"type":"string"},"has_ssn":{"type":"boolean"},"id":{"type":"integer"},"last_name":{"type":"string"},"latest_coverage":{"nullable":true,"properties":{"cadence":{"type":"string"},"coverage_amount_cents":{"type":"integer"},"coverage_end_date":{"type":"string"},"coverage_start_date":{"type":"string"},"document_url":{"type":"string"},"product_payment_cents":{"type":"integer"},"type":{"type":"string"}},"required":["type","product_payment_cents","cadence","coverage_start_date","coverage_end_date","coverage_amount_cents","document_url"],"type":"object"},"lease_end_date":{"type":"string"},"lease_start_date":{"type":"string"},"monthly_rent_cents":{"type":"integer"},"offered_products":{"items":{"properties":{"cash_deposit_amount_cents":{"nullable":true,"type":"integer"},"enrollment_url":{"nullable":true},"monthly_enrollment_url":{"nullable":true},"monthly_premium_cents":{"nullable":true,"type":"integer"},"product_type":{"enum":["security_deposit_insurance","cash_deposit"],"type":"string"},"upfront_enrollment_url":{"nullable":true},"upfront_premium_cents":{"nullable":true,"type":"integer"}},"required":["product_type"],"type":"object"},"type":"array"},"percent_savings":{"format":"float","nullable":true,"type":"number"},"phone":{"type":"string"},"pms_property_id":{"type":"string"},"pms_prospect_id":{"type":"string"},"pms_type":{"enum":["yardi"],"type":"string"},"pms_unit_id":{"type":"string"},"screening_result":{"enum":["approved","conditional","denied"],"type":"string"},"source":{"type":"string"},"source_prospect_id":{"type":"string"},"status":{"enum":["incomplete","processing","ready","error"],"type":"string"},"yearly_income":{"type":"integer"}},"required":["id","source","source_prospect_id","email","phone","first_name","last_name","lease_start_date","lease_end_date","screening_result","monthly_rent_cents","birthdate","employment_status","yearly_income","has_ssn","pms_type","pms_property_id","pms_unit_id","pms_prospect_id","deposit_amount_cents","effective_coverage_amount_cents","percent_savings","enrollment_url","offered_products","status","application_submitted","latest_coverage"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","prospect"],"type":"object"}}},"description":"Fetch a prospect's current status, eligibility offers, and coverage details. Use this to check whether a prospect has been processed and what products are available.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"Fetch a prospect's current status, eligibility offers, and coverage details. Use this to check whether a prospect has been processed and what products are available."},"404":{"description":"Fetch a prospect's current status, eligibility offers, and coverage details. Use this to check whether a prospect has been processed and what products are available."}},"summary":"Get prospect by ID","tags":["Prospects"]}},"/partners/{owner_slug}/test/residents/{source}/{source_prospect_id}":{"delete":{"parameters":[{"example":"application/x-www-form-urlencoded","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":"colette-schiller-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}},{"example":"yardi","in":"path","name":"source","required":true,"schema":{"type":"string"}},{"example":"resident-123","in":"path","name":"source_prospect_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"reset":{"insurance_policy_ids":[8],"reprocessed_prospect_id":8,"unlinked_yardi_resident_ids":[8]},"status_code":200},"schema":{"properties":{"reset":{"properties":{"insurance_policy_ids":{"items":{"type":"integer"},"type":"array"},"reprocessed_prospect_id":{"type":"integer"},"unlinked_yardi_resident_ids":{"items":{"type":"integer"},"type":"array"}},"required":["insurance_policy_ids","unlinked_yardi_resident_ids","reprocessed_prospect_id"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","reset"],"type":"object"}}},"description":"runs the reset and returns success","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"returns unauthorized"},"404":{"content":{"application/json":{"example":{"error":"Resident not found.","status_code":404},"schema":{"properties":{"error":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","error"],"type":"object"}}},"description":"returns not found"},"422":{"content":{"application/json":{"example":{"error":"RuntimeError: SayRhino teardown failed (500): {\"error\" => \"kaboom\"}","status_code":422},"schema":{"properties":{"error":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","error"],"type":"object"}}},"description":"returns unprocessable entity with the error","headers":{"Content-Type":{"schema":{"type":"string"}}}}},"summary":"destroy","tags":["PartnerApi::V2::Test::Resident"]}},"/partners/{owner_slug}/test/sayrhino_users":{"delete":{"parameters":[{"example":"application/json","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":"kendall-volkman-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"reset":{"deleted_third_party_prospect_ids":[16],"insurance_policy_ids":[16],"third_party_prospect_ids":[16],"unlinked_yardi_resident_ids":[16]},"status_code":200},"schema":{"properties":{"reset":{"properties":{"deleted_third_party_prospect_ids":{"items":{"type":"integer"},"type":"array"},"insurance_policy_ids":{"items":{"type":"integer"},"type":"array"},"third_party_prospect_ids":{"items":{"type":"integer"},"type":"array"},"unlinked_yardi_resident_ids":{"items":{"type":"integer"},"type":"array"}},"required":["insurance_policy_ids","third_party_prospect_ids","unlinked_yardi_resident_ids","deleted_third_party_prospect_ids"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","reset"],"type":"object"}}},"description":"runs the reset and returns success","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"returns unauthorized"},"404":{"description":"returns not found"},"422":{"content":{"application/json":{"example":{"error":"RuntimeError: SayRhino teardown failed (500): {\"error\" => \"kaboom\"}","status_code":422},"schema":{"properties":{"error":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","error"],"type":"object"}}},"description":"returns unprocessable entity with the error","headers":{"Content-Type":{"schema":{"type":"string"}}}}},"summary":"destroy","tags":["PartnerApi::V2::Test::SayrhinoUser"]}},"/partners/{owner_slug}/webhooks/endpoints":{"get":{"parameters":[{"example":"pauline-toy-iii-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"endpoints":[],"status_code":200},"schema":{"properties":{"endpoints":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"destination_url":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"suspension_reason":{"nullable":true},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","destination_url","status","events","suspension_reason","created_at","updated_at"],"type":"object"},"type":"array"},"status_code":{"type":"integer"}},"required":["status_code","endpoints"],"type":"object"}}},"description":"List all webhook endpoints configured for a property owner.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"List all webhook endpoints configured for a property owner."},"404":{"description":"List all webhook endpoints configured for a property owner."}},"summary":"List webhook endpoints","tags":["Webhooks"]},"post":{"parameters":[{"example":"application/json","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":"chase-nienow-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endpoint":{"destination_url":"https://new-url.example.com/hook","events":["prospect.created"],"name":"New Endpoint"}},"schema":{"properties":{"endpoint":{"properties":{"destination_url":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"required":["destination_url","name","events"],"type":"object"}},"required":["endpoint"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"created_at":"2017-02-03T04:05:06.000Z","destination_url":"https://new-url.example.com/hook","events":["prospect.created"],"id":30,"name":"New Endpoint","status":"active","suspension_reason":null,"updated_at":"2017-02-03T04:05:06.000Z"},"status_code":200},"schema":{"properties":{"endpoint":{"properties":{"created_at":{"format":"date-time","type":"string"},"destination_url":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"enum":["active","suspended","disabled"],"type":"string"},"suspension_reason":{"nullable":true},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","destination_url","status","events","suspension_reason","created_at","updated_at"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","endpoint"],"type":"object"}}},"description":"Register a new webhook endpoint to receive event notifications. The destination URL must use HTTPS.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"Register a new webhook endpoint to receive event notifications. The destination URL must use HTTPS."},"422":{"content":{"application/json":{"example":{"endpoint":{"destination_url":"Destination url must use HTTPS"},"error":"Invalid endpoint params.","status_code":422},"schema":{"properties":{"endpoint":{"properties":{"destination_url":{"type":"string"}},"required":["destination_url"],"type":"object"},"error":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","error","endpoint"],"type":"object"}}},"description":"Register a new webhook endpoint to receive event notifications. The destination URL must use HTTPS.","headers":{"Content-Type":{"schema":{"type":"string"}}}}},"summary":"Create a webhook endpoint","tags":["Webhooks"]}},"/partners/{owner_slug}/webhooks/endpoints/{endpoint_id}/deliveries":{"get":{"parameters":[{"example":15,"in":"path","name":"endpoint_id","required":true,"schema":{"type":"integer"}},{"example":"granville-hermiston-cpa-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}},{"example":2,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"example":2,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"example":"retrying","in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deliveries":[{"attempt_number":1,"created_at":"2017-02-03T04:05:06.000Z","delivered_at":null,"duration_ms":null,"endpoint_id":9,"id":17,"last_attempt_failure_reason":null,"last_attempted_at":null,"next_retry_at":null,"payload":{"data":{"insurance_policy_id":1},"event":"policy.created"},"status":"pending","updated_at":"2017-02-03T04:05:06.000Z"}],"meta":{"page":2,"per_page":2,"total_count":3,"total_pages":2},"status_code":200},"schema":{"properties":{"deliveries":{"items":{"properties":{"attempt_number":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"delivered_at":{"format":"date-time","nullable":true,"type":"string"},"duration_ms":{"nullable":true},"endpoint_id":{"type":"integer"},"id":{"type":"integer"},"last_attempt_failure_reason":{"nullable":true},"last_attempted_at":{"format":"date-time","nullable":true,"type":"string"},"next_retry_at":{"format":"date-time","nullable":true,"type":"string"},"payload":{"properties":{"data":{"properties":{"insurance_policy_id":{"type":"integer"}},"required":["insurance_policy_id"],"type":"object"},"event":{"type":"string"}},"required":["data","event"],"type":"object"},"status":{"enum":["pending","delivering","delivered","retrying","rate_limited","failed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","endpoint_id","status","attempt_number","payload","last_attempted_at","delivered_at","next_retry_at","last_attempt_failure_reason","duration_ms","created_at","updated_at"],"type":"object"},"type":"array"},"meta":{"properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_count":{"type":"integer"},"total_pages":{"type":"integer"}},"required":["page","per_page","total_count","total_pages"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","deliveries","meta"],"type":"object"}}},"description":"List webhook delivery attempts for a specific endpoint. Supports filtering by status and pagination.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"List webhook delivery attempts for a specific endpoint. Supports filtering by status and pagination."},"404":{"description":"List webhook delivery attempts for a specific endpoint. Supports filtering by status and pagination."}},"summary":"List deliveries for an endpoint","tags":["Webhooks"]}},"/partners/{owner_slug}/webhooks/endpoints/{endpoint_id}/deliveries/{id}":{"get":{"parameters":[{"example":21,"in":"path","name":"endpoint_id","required":true,"schema":{"type":"integer"}},{"example":25,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"example":"otto-kirlin-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"delivery":{"attempt_number":3,"created_at":"2017-02-03T04:05:06.000Z","delivered_at":null,"duration_ms":null,"endpoint_id":16,"id":20,"last_attempt_failure_reason":null,"last_attempted_at":null,"next_retry_at":null,"payload":{"data":{"insurance_policy_id":1},"event":"policy.created"},"status":"failed","updated_at":"2017-02-03T04:05:06.000Z"},"status_code":200},"schema":{"properties":{"delivery":{"properties":{"attempt_number":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"delivered_at":{"format":"date-time","nullable":true,"type":"string"},"duration_ms":{"nullable":true},"endpoint_id":{"type":"integer"},"id":{"type":"integer"},"last_attempt_failure_reason":{"nullable":true},"last_attempted_at":{"format":"date-time","nullable":true,"type":"string"},"next_retry_at":{"format":"date-time","nullable":true,"type":"string"},"payload":{"properties":{"data":{"properties":{"insurance_policy_id":{"type":"integer"}},"required":["insurance_policy_id"],"type":"object"},"event":{"type":"string"}},"required":["data","event"],"type":"object"},"status":{"enum":["pending","delivering","delivered","retrying","rate_limited","failed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","endpoint_id","status","attempt_number","payload","last_attempted_at","delivered_at","next_retry_at","last_attempt_failure_reason","duration_ms","created_at","updated_at"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","delivery"],"type":"object"}}},"description":"Fetch details of a single webhook delivery attempt including payload, status, and retry information.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"Fetch details of a single webhook delivery attempt including payload, status, and retry information."},"404":{"description":"Fetch details of a single webhook delivery attempt including payload, status, and retry information."}},"summary":"Get a specific delivery","tags":["Webhooks"]}},"/partners/{owner_slug}/webhooks/endpoints/{endpoint_id}/deliveries/{id}/retry":{"post":{"parameters":[{"example":"application/json","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":27,"in":"path","name":"endpoint_id","required":true,"schema":{"type":"integer"}},{"example":31,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"example":"johanne-senger-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"properties":{},"type":"object"}}}},"responses":{"204":{"description":"Re-enqueue a failed webhook delivery for another attempt."},"401":{"description":"Re-enqueue a failed webhook delivery for another attempt."},"404":{"description":"Re-enqueue a failed webhook delivery for another attempt."}},"summary":"Retry a failed delivery","tags":["Webhooks"]}},"/partners/{owner_slug}/webhooks/endpoints/{id}":{"delete":{"parameters":[{"example":"application/x-www-form-urlencoded","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":50,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"example":"mrs-josefa-morissette-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Permanently remove a webhook endpoint. All pending deliveries will be cancelled."},"401":{"description":"Permanently remove a webhook endpoint. All pending deliveries will be cancelled."},"404":{"description":"Permanently remove a webhook endpoint. All pending deliveries will be cancelled."}},"summary":"Delete a webhook endpoint","tags":["Webhooks"]},"put":{"parameters":[{"example":"application/json","in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"example":"ying-stiedemann-1","in":"path","name":"owner_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endpoint":{"destination_url":"https://new-url.example.com/hook","events":["prospect.created","prospect.updated"],"status":"suspended"}},"schema":{"properties":{"endpoint":{"properties":{"destination_url":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active","suspended","disabled"],"type":"string"}},"type":"object"}},"required":["endpoint"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"endpoint":{"created_at":"2017-02-03T04:05:06.000Z","destination_url":"https://example.com/webhooks/foo/bar","events":["prospect.created","prospect.ready","prospect.incomplete","policy.created","policy.updated","policy.canceled","policy.expired","policy.documents_updated","policy_application.created","policy_application.quoted","policy_application.declined","policy_application.submitted","delinquency.created","delinquency.resolved"],"id":34,"name":"Test endpoint","status":"suspended","suspension_reason":null,"updated_at":"2017-02-03T04:05:06.000Z"},"status_code":200},"schema":{"properties":{"endpoint":{"properties":{"created_at":{"format":"date-time","type":"string"},"destination_url":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"enum":["active","suspended","disabled"],"type":"string"},"suspension_reason":{"nullable":true},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","destination_url","status","events","suspension_reason","created_at","updated_at"],"type":"object"},"status_code":{"type":"integer"}},"required":["status_code","endpoint"],"type":"object"}}},"description":"Update an existing webhook endpoint's destination URL, status, or subscribed events.","headers":{"Content-Type":{"schema":{"type":"string"}}}},"401":{"description":"Update an existing webhook endpoint's destination URL, status, or subscribed events."},"404":{"description":"Update an existing webhook endpoint's destination URL, status, or subscribed events."},"422":{"content":{"application/json":{"example":{"endpoint":{"destination_url":"Destination url must use HTTPS","status":"Status is invalid"},"error":"Endpoint invalid.","status_code":422},"schema":{"properties":{"endpoint":{"properties":{"destination_url":{"type":"string"},"status":{"enum":["active","suspended","disabled"],"type":"string"}},"type":"object"},"error":{"type":"string"},"status_code":{"type":"integer"}},"required":["status_code","error","endpoint"],"type":"object"}}},"description":"Update an existing webhook endpoint's destination URL, status, or subscribed events.","headers":{"Content-Type":{"schema":{"type":"string"}}}}},"summary":"Update a webhook endpoint","tags":["Webhooks"]}},"/token":{"post":{"description":"Obtain a JWT via OAuth2 client_credentials grant.","requestBody":{"content":{"application/json":{"schema":{"properties":{"audience":{"description":"API identifier provided during onboarding","type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"grant_type":{"enum":["client_credentials"],"type":"string"}},"required":["client_id","client_secret","grant_type","audience"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"access_token":{"type":"string"},"expires_in":{"description":"Token lifetime in seconds","type":"integer"},"scope":{"type":"string"},"token_type":{"enum":["Bearer"],"type":"string"}},"type":"object"}}},"description":"Token issued"},"401":{"description":"Invalid credentials"}},"security":[],"summary":"Request an access token","tags":["Authentication"]}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Authentication"},{"name":"Prospects"},{"name":"PartnerApi::V2::Test::Resident"},{"name":"PartnerApi::V2::Test::SayrhinoUser"},{"name":"Webhooks"}]}