API Documentation

This document explains the available endpoints of our Dad Jokes API.

GET /api/v1/random

Returns a random dad joke in JSON format.

Response Example:

      "author": "John Doe",
      "joke_text": "I'm reading a book on anti-gravity. It's impossible to put down!"

POST /api/v1/submit

Submits a new dad joke. This endpoint expects a JSON object with an "author" and "joke_text".

Request Example:

      "author": "Jane Doe",
      "joke_text": "Why don't scientists trust atoms? Because they make up everything."

Make sure to set Content-Type: application/json in your request header.