{"openapi":"3.0.3","info":{"title":"SingleFax API","version":"1.0.0","description":"Send faxes via API keys + prepaid credits. Machine MPP and MCP OAuth are feature-flagged."},"servers":[{"url":"https://singlefax.com"}],"paths":{"/api/v1/uploads":{"post":{"operationId":"createUpload","summary":"Create a short-lived upload capability","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string"},"maxBytes":{"type":"integer"}}}}}},"responses":{"200":{"description":"Upload token + PUT URL","content":{"application/json":{"schema":{"type":"object","required":["uploadToken","uploadUrl","expiresAt"],"properties":{"uploadToken":{"type":"string"},"uploadUrl":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"key":{"type":"string"},"contentType":{"type":"string"},"maxBytes":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}}},"/api/v1/uploads/{token}":{"put":{"operationId":"putUpload","summary":"Upload file bytes for a previously issued uploadToken","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stored"}}}},"/api/v1/faxes":{"post":{"operationId":"sendFax","summary":"Send a fax (debits prepaid credits)","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Queued fax order"},"402":{"description":"Insufficient credits"},"409":{"description":"Idempotency conflict"},"429":{"description":"Rate limited"}}},"get":{"operationId":"listFaxes","summary":"List faxes","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Fax list"}}}},"/api/v1/faxes/{id}":{"get":{"operationId":"getFax","summary":"Get fax status including latest provider attempt","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fax order"}}}},"/api/v1/credits":{"get":{"operationId":"getCredits","summary":"Credit balance and ledger","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance"}}}},"/api/v1/credits/checkout":{"post":{"operationId":"createCreditCheckout","summary":"Start Stripe Checkout for a credit pack","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Checkout URL"}}}},"/api/v1/machine/faxes/validate":{"post":{"operationId":"validateMachineFax","summary":"Quote a machine/MPP fax without side effects","responses":{"200":{"description":"Quote"},"503":{"description":"MPP disabled"}}}},"/api/v1/machine/faxes":{"post":{"operationId":"createMachineFax","summary":"Create machine fax (HTTP 402 MPP challenge when unpaid)","x-payment-info":{"offers":[{"amount":null,"currency":"usd","intent":"charge","method":"stripe","description":"Quoted per-destination fax price; authoritative amount is in the 402 challenge."}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","base64","request_id"],"properties":{"to":{"type":"string","description":"Destination fax number in E.164","example":"+14155552671"},"base64":{"type":"string","description":"PDF document encoded as base64","example":"JVBERi0xLjEKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFI+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvTWVkaWFCb3hbMCAwIDYxMiA3OTJdPj4KZW5kb2JqCnhyZWYKMCA0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSA0Ci9Sb290IDEgMCBSCj4+CnN0YXJ0eHJlZgoxNzMKJSVFT0YK"},"request_id":{"type":"string","description":"Client idempotency key for challenge + charge","example":"mpp-validate-1"},"cover":{"type":"boolean"}}},"example":{"to":"+14155552671","base64":"JVBERi0xLjEKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFI+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvTWVkaWFCb3hbMCAwIDYxMiA3OTJdPj4KZW5kb2JqCnhyZWYKMCA0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSA0Ci9Sb290IDEgMCBSCj4+CnN0YXJ0eHJlZgoxNzMKJSVFT0YK","request_id":"mpp-validate-1"}}}},"responses":{"200":{"description":"Paid order"},"402":{"description":"Payment required"},"503":{"description":"MPP disabled"}}}}},"x-service-info":{"categories":["communication","fax"],"docs":{"homepage":"https://singlefax.com","apiReference":"https://singlefax.com/openapi.json","llms":"https://singlefax.com/llms.txt"}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: sf_live_… or sf_test_…"}}}}