{"openapi":"3.1.0","info":{"title":"RelayFox API","version":"1.0.0","description":"Manage RelayFox webhook endpoints, captured requests, sharing, collaborators, billing handoffs, API keys, and live streams. Start with GET /api/v1/capabilities to inspect the actions allowed by the presented key and account plan."},"servers":[{"url":"https://relayfox.dev"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Discovery"},{"name":"Account"},{"name":"Endpoints"},{"name":"Requests"},{"name":"Sharing"},{"name":"Members"},{"name":"Billing"},{"name":"API keys"},{"name":"Streaming"}],"paths":{"/api/v1":{"get":{"operationId":"getApiRoot","summary":"Get API discovery links","tags":["Discovery"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"API discovery document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/capabilities":{"get":{"operationId":"getCapabilities","summary":"Discover actions allowed by this key and plan","description":"This endpoint accepts any valid API key. Each returned operation includes its required scope and current availability.","tags":["Discovery"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Key-specific capability document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/account":{"get":{"operationId":"getAccount","summary":"Get account and plan limits","tags":["Account"],"security":[{"bearerAuth":[]}],"x-required-scope":"account:read","responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints":{"get":{"operationId":"listEndpoints","summary":"List owned webhook endpoints","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:read","responses":{"200":{"description":"Endpoint list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EndpointSummary"}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createEndpoint","summary":"Create a webhook endpoint","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":["string","null"],"maxLength":80},"response_status":{"type":"integer","minimum":200,"maximum":599},"response_body":{"type":"string","maxLength":10000},"response_content_type":{"type":"string","minLength":1,"maxLength":100}}}}}},"responses":{"201":{"description":"Created endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}":{"get":{"operationId":"getEndpoint","summary":"Get an endpoint","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:read","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"updateEndpoint","summary":"Update an owned endpoint","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":["string","null"],"maxLength":80},"response_status":{"type":"integer","minimum":200,"maximum":599},"response_body":{"type":"string","maxLength":10000},"response_content_type":{"type":"string","minLength":1,"maxLength":100}}}}}},"responses":{"200":{"description":"Updated endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteEndpoint","summary":"Delete an owned endpoint","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}/claim":{"post":{"operationId":"claimEndpoint","summary":"Claim an anonymous endpoint","tags":["Endpoints"],"security":[{"bearerAuth":[]}],"x-required-scope":"endpoints:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Claimed endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}/requests":{"get":{"operationId":"listRequests","summary":"List captured requests","tags":["Requests"],"security":[{"bearerAuth":[]}],"x-required-scope":"requests:read","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before_seq","in":"query","description":"Return older requests for descending pagination.","schema":{"type":"integer","minimum":1}},{"name":"after_seq","in":"query","description":"Return requests newer than this sequence.","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Captured request page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CapturedRequest"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_before_seq":{"type":["integer","null"]}}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/requests/{request_id}":{"get":{"operationId":"getRequest","summary":"Get a captured request","tags":["Requests"],"security":[{"bearerAuth":[]}],"x-required-scope":"requests:read","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Captured request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapturedRequest"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteRequest","summary":"Delete a captured request","tags":["Requests"],"security":[{"bearerAuth":[]}],"x-required-scope":"requests:write","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/requests/{request_id}/replay":{"post":{"operationId":"replayRequest","summary":"Replay a captured request","description":"The target must resolve only to public IP addresses. Optional body edits require a Pro owner.","tags":["Requests"],"security":[{"bearerAuth":[]}],"x-required-scope":"requests:replay","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["target_url"],"properties":{"target_url":{"type":"string","format":"uri","maxLength":2048},"body_text":{"type":"string","description":"Optional Pro-only replacement request body."}}}}}},"responses":{"200":{"description":"Replay result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"target_status":{"type":"integer"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}/share":{"get":{"operationId":"getShare","summary":"Get share-link status","tags":["Sharing"],"security":[{"bearerAuth":[]}],"x-required-scope":"sharing:read","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Share-link status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"operationId":"enableShare","summary":"Enable a read-only share link","tags":["Sharing"],"security":[{"bearerAuth":[]}],"x-required-scope":"sharing:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Enabled share link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"disableShare","summary":"Disable the share link","tags":["Sharing"],"security":[{"bearerAuth":[]}],"x-required-scope":"sharing:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Disabled"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}/members":{"get":{"operationId":"listMembers","summary":"List endpoint collaborators","tags":["Members"],"security":[{"bearerAuth":[]}],"x-required-scope":"members:read","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Collaborator list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"inviteMember","summary":"Invite a collaborator","tags":["Members"],"security":[{"bearerAuth":[]}],"x-required-scope":"members:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":320}}}}}},"responses":{"201":{"description":"Invited","content":{"application/json":{"schema":{"type":"object","properties":{"invited":{"const":true},"email":{"type":"string","format":"email"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/endpoints/{endpoint_id}/members/{user_id}":{"delete":{"operationId":"removeMember","summary":"Remove a collaborator","tags":["Members"],"security":[{"bearerAuth":[]}],"x-required-scope":"members:write","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/billing/checkout":{"post":{"operationId":"createCheckout","summary":"Create a Pro checkout URL","tags":["Billing"],"security":[{"bearerAuth":[]}],"x-required-scope":"billing:write","responses":{"201":{"description":"Hosted checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/billing/portal":{"post":{"operationId":"createBillingPortal","summary":"Create a billing portal URL","tags":["Billing"],"security":[{"bearerAuth":[]}],"x-required-scope":"billing:write","responses":{"201":{"description":"Hosted portal URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/keys":{"get":{"operationId":"listApiKeys","summary":"List API-key metadata","tags":["API keys"],"security":[{"bearerAuth":[]}],"x-required-scope":"keys:read","responses":{"200":{"description":"API-key list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyMetadata"}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createApiKey","summary":"Create a scoped child key","description":"The requested scopes must be a subset of the authenticating key's scopes. The plaintext key is returned only once.","tags":["API keys"],"security":[{"bearerAuth":[]}],"x-required-scope":"keys:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["scopes"],"properties":{"name":{"type":"string","maxLength":80},"scopes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["account:read","endpoints:read","endpoints:write","requests:read","requests:write","requests:replay","sharing:read","sharing:write","members:read","members:write","billing:write","keys:read","keys:write","stream:read"]}},"expires_at":{"type":["string","null"],"format":"date-time","description":"Optional expiry no more than 366 days away."}}}}}},"responses":{"201":{"description":"Created API key","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiKeyMetadata"},{"type":"object","required":["key"],"properties":{"key":{"type":"string","description":"Plaintext secret shown only in this response."}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/keys/{key_id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke an API key","tags":["API keys"],"security":[{"bearerAuth":[]}],"x-required-scope":"keys:write","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/stream/{endpoint_id}":{"get":{"operationId":"streamRequests","summary":"Stream newly captured requests over SSE","tags":["Streaming"],"security":[{"bearerAuth":[]}],"x-required-scope":"stream:read","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Last-Event-ID","in":"header","schema":{"type":"string"}},{"name":"after","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Server-Sent Events stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"RelayFox API key","description":"Pass the one-time key value as Authorization: Bearer rfx_.... X-API-Key is also accepted by /api/v1 routes."}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"request_id":{"type":"string"}}}}},"EndpointSummary":{"type":"object","required":["id","capture_url","viewer_url","request_count"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"capture_url":{"type":"string","format":"uri"},"viewer_url":{"type":"string","format":"uri"},"request_count":{"type":"integer"},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Endpoint":{"type":"object","required":["id","capture_url","viewer_url","is_owner","response","created_at"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"capture_url":{"type":"string","format":"uri"},"viewer_url":{"type":"string","format":"uri"},"is_owner":{"type":"boolean"},"response":{"type":"object","properties":{"status":{"type":"integer"},"body":{"type":"string"},"content_type":{"type":"string"}}},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"CapturedRequest":{"type":"object","required":["id","seq","endpointId","method","path","headers","bodyText","createdAt"],"properties":{"id":{"type":"string"},"seq":{"type":"integer"},"endpointId":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"query":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyText":{"type":"string"},"contentType":{"type":["string","null"]},"sizeBytes":{"type":"integer"},"truncated":{"type":"integer","enum":[0,1]},"sourceIp":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}},"Share":{"type":"object","required":["enabled","url"],"properties":{"enabled":{"type":"boolean"},"url":{"type":["string","null"],"format":"uri"}}},"Member":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","member"]},"created_at":{"type":"string","format":"date-time"}}},"ApiKeyMetadata":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hint":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","endpoints:read","endpoints:write","requests:read","requests:write","requests:replay","sharing:read","sharing:write","members:read","members:write","billing:write","keys:read","keys:write","stream:read"]}},"expires_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Capabilities":{"type":"object","required":["api_version","authenticated_as","links","plan_limits","operations"],"properties":{"api_version":{"const":"v1"},"authenticated_as":{"type":"object","additionalProperties":true},"links":{"type":"object","additionalProperties":true},"plan_limits":{"type":"object","additionalProperties":true},"operations":{"type":"array","items":{"type":"object","required":["id","method","path","scope","available"],"properties":{"id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"scope":{"type":"string","enum":["account:read","endpoints:read","endpoints:write","requests:read","requests:write","requests:replay","sharing:read","sharing:write","members:read","members:write","billing:write","keys:read","keys:write","stream:read"]},"description":{"type":"string"},"plan":{"type":"string","enum":["pro"]},"available":{"type":"boolean"},"unavailable_reason":{"type":["string","null"]}}}}}}}}}