This version is deprecated and will be removed in the future, please use v2 instead.

BasicJokes

Jokes

These endpoints allow you to retrieve all jokes, a single joke by its id, or a random joke. The response will be an array of JSON objects if you request all jokes, or a single JSON object if you request a single joke or a random joke.

The Joke model

PropTypeDefault
id
integer
-
type
string
-
setup
string
-
punchline
string
-

All jokes

GET/jokes

Retrieve all jokes.

Response
[
  {
    "id": 1,
    "type": "general",
    "setup": "What did the fish say when it hit the wall?",
    "punchline": "Dam."
  },
  {
    "id": 2,
    "type": "general",
    "setup": "How do you make a tissue dance?",
    "punchline": "You put a little boogie on it."
  }
  // ...
]

Single joke

GET/jokes/<id>

Retrieve a single joke by its id.

Response
{
  "id": 1,
  "type": "general",
  "setup": "What did the fish say when it hit the wall?",
  "punchline": "Dam."
}

Random joke

GET/jokes/random

Retrieve a random joke.

Response
{
  "id": 120,
  "type": "general",
  "setup": "How do locomotives know where they're going?",
  "punchline": "Lots of training"
}