{"openapi":"3.1.0","info":{"title":"Registrar API","version":"0.1.0"},"components":{"schemas":{"RegistrarAccount":{"type":"object","properties":{"id":{"type":"string"},"registrar":{"type":"string","enum":["cloudflare_registrar","porkbun","spaceship","gandi","godaddy"]},"login":{"type":["string","null"]},"customer_id":{"type":["string","null"]},"two_factor":{"type":"boolean"},"note":{"type":["string","null"]},"sandbox":{"type":"object","properties":{"conn_status":{"type":"string","enum":["not_connected","connected","invalid"]},"credential_version":{"type":["integer","null"]},"last_verified_at":{"type":["integer","null"],"description":"Unix seconds"},"capabilities":{"type":["object","null"],"properties":{"search":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"quote":{"type":"object","properties":{"register":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"renew":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"transfer":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["register","renew","transfer"]},"submit":{"type":"object","properties":{"register":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"renew":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"transfer":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["register","renew","transfer"]},"reconcile":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"autoRenewSetting":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"privacy":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["search","quote","submit","reconcile","autoRenewSetting","privacy"]}},"required":["conn_status","credential_version","last_verified_at","capabilities"]},"live":{"type":"object","properties":{"conn_status":{"type":"string","enum":["not_connected","connected","invalid"]},"credential_version":{"type":["integer","null"]},"last_verified_at":{"type":["integer","null"],"description":"Unix seconds"},"capabilities":{"type":["object","null"],"properties":{"search":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"quote":{"type":"object","properties":{"register":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"renew":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"transfer":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["register","renew","transfer"]},"submit":{"type":"object","properties":{"register":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"renew":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"transfer":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["register","renew","transfer"]},"reconcile":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"autoRenewSetting":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]},"privacy":{"type":"object","properties":{"supported":{"type":"boolean"},"evidenceVersion":{"type":"string"},"reason":{"type":"string"}},"required":["supported","evidenceVersion"]}},"required":["search","quote","submit","reconcile","autoRenewSetting","privacy"]}},"required":["conn_status","credential_version","last_verified_at","capabilities"]},"created_at":{"type":"integer","description":"Unix seconds"},"updated_at":{"type":"integer","description":"Unix seconds"}},"required":["id","registrar","login","customer_id","two_factor","note","sandbox","live","created_at","updated_at"]},"ApiError":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false},"error":{"type":"object","properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Authentication required"},"docsUrl":{"type":"string","example":"/api/reference#tag/errors/unauthorized"},"details":{"type":"object","additionalProperties":{},"example":{"field":"email"}},"retryAfter":{"type":"number","example":60},"field":{"type":"string","example":"email"}},"required":["code","message"]},"requestId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["success","error","requestId"]},"RegistrarDomain":{"type":"object","properties":{"id":{"type":"string"},"instance_id":{"type":"string"},"collection_key":{"type":"string"},"record_id":{"type":"string"},"domain_norm":{"type":"string"},"account_id":{"type":["string","null"]},"provider_domain_id":{"type":["string","null"]},"observed_expiry":{"type":["integer","null"]},"observed_auto_renew":{"type":["boolean","null"]},"observed_privacy":{"type":["boolean","null"]},"transfer_state":{"type":["string","null"]},"last_synced_at":{"type":["integer","null"]},"projection_generation":{"type":"integer"},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}},"required":["id","instance_id","collection_key","record_id","domain_norm","account_id","provider_domain_id","observed_expiry","observed_auto_renew","observed_privacy","transfer_state","last_synced_at","projection_generation","created_at","updated_at"]},"RegistrarHistory":{"type":"object","properties":{"domain":{"type":"string"},"archive":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["found"]},"completeness":{"type":"number","enum":[1]},"data":{"type":"object","properties":{"first":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["timestamp","url"],"additionalProperties":false},"last":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["timestamp","url"],"additionalProperties":false},"count":{"type":"integer","exclusiveMinimum":0}},"required":["first","last","count"],"additionalProperties":false}},"required":["status","completeness","data"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"completeness":{"type":"number","enum":[0]},"data":{"type":"object","properties":{"first":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["timestamp","url"],"additionalProperties":false},"last":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["timestamp","url"],"additionalProperties":false},"count":{"type":"integer","exclusiveMinimum":0}},"required":["first","last","count"],"additionalProperties":false}},"required":["status","completeness","data"],"additionalProperties":false,"description":"Page limit reached: count is a lower bound; first/last cover observed captures only"},{"type":"object","properties":{"status":{"type":"string","enum":["none_observed"]},"completeness":{"type":"number","enum":[1]}},"required":["status","completeness"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","error"]},"completeness":{"type":"number","enum":[0]}},"required":["status","completeness"],"additionalProperties":false}]},"certificates":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["found"]},"completeness":{"type":"number","enum":[1]},"source":{"type":"string","enum":["crtsh","certspotter"],"description":"certspotter: unexpired certificates only; counts and latest issuer cover current certificates"},"data":{"type":"object","properties":{"by_year":{"type":"object","additionalProperties":{"type":"integer","exclusiveMinimum":0}},"latest_issuer":{"type":"string"}},"required":["by_year","latest_issuer"],"additionalProperties":false}},"required":["status","completeness","source","data"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["partial"]},"completeness":{"type":"number","enum":[0]},"source":{"type":"string","enum":["crtsh","certspotter"],"description":"certspotter: unexpired certificates only; counts and latest issuer cover current certificates"},"data":{"type":"object","properties":{"by_year":{"type":"object","additionalProperties":{"type":"integer","exclusiveMinimum":0}},"latest_issuer":{"type":"string"}},"required":["by_year","latest_issuer"],"additionalProperties":false}},"required":["status","completeness","source","data"],"additionalProperties":false,"description":"Page limit reached: counts are lower bounds"},{"type":"object","properties":{"status":{"type":"string","enum":["none_observed"]},"completeness":{"type":"number","enum":[1]},"source":{"type":"string","enum":["crtsh","certspotter"],"description":"certspotter: unexpired certificates only; counts and latest issuer cover current certificates"}},"required":["status","completeness","source"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","error"]},"completeness":{"type":"number","enum":[0]}},"required":["status","completeness"],"additionalProperties":false}]}},"required":["domain","archive","certificates"],"additionalProperties":false}},"parameters":{}},"paths":{"/v1/registrar/accounts":{"get":{"tags":["Registrar accounts"],"responses":{"200":{"description":"Accounts","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/RegistrarAccount"}}},"required":["accounts"]}}}},"400":{"description":"Credential configuration invalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"403":{"description":"Access refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"404":{"description":"Credential unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"409":{"description":"Credential or capability unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"422":{"description":"Invalid input or account limit","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}}}},"post":{"tags":["Registrar accounts"],"requestBody":{"description":"Account","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"registrar":{"type":"string","enum":["cloudflare_registrar","porkbun","spaceship","gandi","godaddy"]},"login":{"type":["string","null"],"maxLength":254},"customer_id":{"type":["string","null"],"maxLength":100},"two_factor":{"type":"boolean"},"note":{"type":["string","null"],"maxLength":2000}},"required":["registrar"]}}}},"responses":{"201":{"description":"Created account","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/RegistrarAccount"}},"required":["account"]}}}},"400":{"description":"Credential configuration invalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"403":{"description":"Access refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"404":{"description":"Credential unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"409":{"description":"Credential or capability unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"422":{"description":"Invalid input or account limit","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}}}}},"/v1/registrar/accounts/{id}/verify":{"post":{"tags":["Registrar accounts"],"parameters":[{"schema":{"type":"string","maxLength":32,"pattern":"^rgacc_[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Mode","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["sandbox","live"]}},"required":["mode"]}}}},"responses":{"200":{"description":"Verified account","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/RegistrarAccount"}},"required":["account"]}}}},"400":{"description":"Credential configuration invalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"403":{"description":"Access refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"404":{"description":"Credential unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"409":{"description":"Credential or capability unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"422":{"description":"Invalid input or account limit","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}}}}},"/v1/registrar/accounts/{id}":{"patch":{"tags":["Registrar accounts"],"parameters":[{"schema":{"type":"string","maxLength":32,"pattern":"^rgacc_[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Account fields","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"login":{"type":["string","null"],"maxLength":254},"customer_id":{"type":["string","null"],"maxLength":100},"two_factor":{"type":"boolean"},"note":{"type":["string","null"],"maxLength":2000}}}}}},"responses":{"200":{"description":"Updated account","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/RegistrarAccount"}},"required":["account"]}}}},"400":{"description":"Credential configuration invalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"403":{"description":"Access refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"404":{"description":"Credential unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"409":{"description":"Credential or capability unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"422":{"description":"Invalid input or account limit","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}}}},"delete":{"tags":["Registrar accounts"],"parameters":[{"schema":{"type":"string","maxLength":32,"pattern":"^rgacc_[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted account"},"400":{"description":"Credential configuration invalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"403":{"description":"Access refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"404":{"description":"Credential unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"409":{"description":"Credential or capability unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"422":{"description":"Invalid input or account limit","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"]}]}}}}}}},"/v1/registrar/domains":{"get":{"tags":["Registrar domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"instanceId","in":"query"}],"responses":{"200":{"description":"Owned domain profiles","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/RegistrarDomain"}}},"required":["domains"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Role, organization or ownership refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}]}}}},"409":{"description":"Profile link already in use","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}}},"required":["name","issues"]}},"required":["success","error"]}}}},"429":{"description":"Mutation rate exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Records owner check unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"upstream":{"type":"object","properties":{"status":{"type":"integer"},"body":{"type":"string"}}}},"required":["error","upstream"]}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["LIMITER_UNAVAILABLE"]},"message":{"type":"string"}},"required":["code","message"]}}}}}},"post":{"tags":["Registrar domains"],"requestBody":{"description":"Owned record and asserted domain profile","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instance_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"collection_key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"record_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"domain":{"type":"string"},"account_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["instance_id","collection_key","record_id","domain"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created domain profile","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/RegistrarDomain"}},"required":["domain"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Role, organization or ownership refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}]}}}},"409":{"description":"Profile link already in use","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid input or domain","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}}},"required":["name","issues"]}},"required":["success","error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}]}}}},"429":{"description":"Mutation rate exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Records owner check unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"upstream":{"type":"object","properties":{"status":{"type":"integer"},"body":{"type":"string"}}}},"required":["error","upstream"]}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["LIMITER_UNAVAILABLE"]},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/registrar/domains/{id}":{"patch":{"tags":["Registrar domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Record and account link changes","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instance_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"collection_key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"record_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"account_id":{"type":["string","null"],"minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}}}}}},"responses":{"200":{"description":"Updated domain profile","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/RegistrarDomain"}},"required":["domain"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Role, organization or ownership refused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}]}}}},"409":{"description":"Profile link already in use","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}}},"required":["name","issues"]}},"required":["success","error"]}}}},"429":{"description":"Mutation rate exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"502":{"description":"Records owner check unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"upstream":{"type":"object","properties":{"status":{"type":"integer"},"body":{"type":"string"}}}},"required":["error","upstream"]}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["LIMITER_UNAVAILABLE"]},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/registrar/rates":{"get":{"tags":["Registrar rates"],"responses":{"200":{"description":"USD exchange rates with per-currency provenance","content":{"application/json":{"schema":{"type":"object","properties":{"rates":{"type":"object","additionalProperties":{"type":"string","maxLength":256,"pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"}},"source":{"type":"object","additionalProperties":{"type":"string","enum":["frankfurter","er_api"]}},"fetched_at":{"type":"integer","minimum":0,"description":"Unix seconds"},"stale":{"type":"boolean"}},"required":["rates","source","fetched_at","stale"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Organization or delegation refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unexpected query parameters","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string"},"issues":{"type":"array","items":{}}},"required":["name","issues"]}},"required":["success","error"]}}}},"503":{"description":"No exchange-rate snapshot at most seven days old","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["NO_SNAPSHOT"]}},"required":["code"]}}}}}}},"/v1/registrar/history":{"get":{"tags":["Registrar history"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$"},"required":true,"name":"domain","in":"query"}],"responses":{"200":{"description":"Archive and certificate observations by source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrarHistory"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Organization or delegation refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid domain query","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["name","issues"]}},"required":["success","error"]}}}},"429":{"description":"History rate exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"retry_after":{"type":"integer"}},"required":["code","retry_after"]}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["LIMITER_UNAVAILABLE"]},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/registrar/search":{"get":{"tags":["Registrar search"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":4096},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":1024},"required":false,"name":"endings","in":"query"},{"schema":{"type":"string","maxLength":1024},"required":false,"name":"accountIds","in":"query"},{"schema":{"type":"string","enum":["sandbox","live"],"default":"live"},"required":false,"name":"mode","in":"query"}],"responses":{"200":{"description":"Indicative per-account prices and availability","content":{"application/json":{"schema":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"provider":{"type":"string","enum":["cloudflare_registrar","porkbun","spaceship","gandi","godaddy"]},"domain":{"type":"string"},"status":{"type":"string","enum":["ok","error","timeout","not_connected"]},"available":{"type":["boolean","null"]},"register":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"renew":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"transfer":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"premium":{"type":"boolean"},"code":{"type":"string"}},"required":["account_id","provider","domain","status","available"],"additionalProperties":false}},"availability":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["available","registered","not_registered","unknown"]},"label":{"type":"string","enum":["Available","Registered","Not registered","Unknown"]}},"required":["domain","status","label"],"additionalProperties":false}},"binding":{"type":"boolean","enum":[false]}},"required":["cells","availability","binding"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Organization or delegation refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid or over-broad search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited; retry_after in seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/registrar/compare":{"get":{"tags":["Registrar search"],"parameters":[{"schema":{"type":"string","maxLength":253},"required":true,"name":"domain","in":"query"},{"schema":{"type":"string","enum":["renew","transfer"]},"required":true,"name":"kind","in":"query"},{"schema":{"type":"string","enum":["sandbox","live"],"default":"live"},"required":false,"name":"mode","in":"query"}],"responses":{"200":{"description":"Indicative comparison; obtain a fresh quote before ordering","content":{"application/json":{"schema":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"provider":{"type":"string","enum":["cloudflare_registrar","porkbun","spaceship","gandi","godaddy"]},"domain":{"type":"string"},"status":{"type":"string","enum":["ok","error","timeout","not_connected"]},"available":{"type":["boolean","null"]},"register":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"renew":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"transfer":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"premium":{"type":"boolean"},"code":{"type":"string"}},"required":["account_id","provider","domain","status","available"],"additionalProperties":false}},"availability":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["available","registered","not_registered","unknown"]},"label":{"type":"string","enum":["Available","Registered","Not registered","Unknown"]}},"required":["domain","status","label"],"additionalProperties":false}},"binding":{"type":"boolean","enum":[false]}},"required":["cells","availability","binding"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Organization or delegation refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited; retry_after in seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/registrar/quotes":{"post":{"tags":["Registrar quotes"],"requestBody":{"description":"Read-only quote request; no transfer secrets","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","maxLength":32,"pattern":"^rgacc_[A-Za-z0-9_-]+$"},"domain":{"type":"string","minLength":1,"maxLength":253},"kind":{"type":"string","enum":["register","renew","transfer"]},"years":{"type":"integer","minimum":1,"maximum":10},"mode":{"type":"string","enum":["sandbox","live"],"default":"live"},"options":{"type":"object","properties":{"auto_renew":{"type":"boolean"},"privacy":{"type":"boolean"}},"default":{},"additionalProperties":false}},"required":["account_id","domain","kind","years"],"additionalProperties":false}}}},"responses":{"200":{"description":"Immutable, short-lived quote","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string","enum":["register","renew","transfer"]},"mode":{"type":"string","enum":["sandbox","live"]},"years":{"type":"integer"},"total":{"type":["object","null"],"properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"max":{"type":["object","null"],"properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"fee":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"tax_complete":{"type":"boolean"},"registrant_inputs":{"type":"array","items":{"type":"string"}},"executable":{"type":"boolean"},"expires_at":{"type":"integer"}},"required":["id","account_id","domain","kind","mode","years","total","max","fee","tax_complete","registrant_inputs","executable","expires_at"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Organization admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Capability disabled or account not connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid quote input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited; retry_after in seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Provider quote unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Limiter unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"webhooks":{}}