Coin Flip API

A hilarious API that randomly succeeds or fails with 50/50 probability.

How it works

Each time you call the API, it flips a virtual coin:

  • Heads (50%): Returns success (200) with a winning message
  • Tails (50%): Returns failure (500) with a losing message

Usage

Simply make a request to the endpoint:

curl https://your-username-coinflip.web.val.run

Response Examples

Success Response (200)

{ "success": true, "message": "🎉 You won! The coin landed on heads!", "result": "heads" }

Failure Response (500)

{ "success": false, "message": "💥 You lost! The coin landed on tails!", "result": "tails" }

Use Cases

  • Testing error handling in your applications
  • Chaos engineering experiments
  • Making important life decisions
  • Having fun with unpredictable APIs