POST
/joke
curl \
-X POST https://joke_api.example.com/joke \
-H "Content-Type: application/json" \
-d '{"joke":"Knock Knock. Who's there? Hike. Hike Who?","punchline":"I didn't know you liked Japanese poetry.","category":"KnockKnock"}'
Request examples
Joke with punchline (generated)
{
"joke": "Knock Knock. Who's there? Hike. Hike Who?",
"punchline": "I didn't know you liked Japanese poetry.",
"category": "KnockKnock"
}
{
"joke": "He had a photographic memory but never developed it.",
"category": "Word game"
}
Request examples
Joke with punchline
{
"joke": "Knock Knock. Who's there? Hike. Hike Who?",
"category": "KnockKnock",
"punchline": "I didn't know you liked Japanese poetry."
}
{
"joke": "He had a photographic memory but never developed it.",
"category": "Word game"
}
Response examples (201)
Long way top school
[
{
"id": 33,
"joke": "He used to take his dog to school every day, but he finally had to stop. How come?",
"punchline": "The dog got graduated.",
"category": "School",
"dateAdded": "2017-07-12T20:12:33.001Z",
"thumbsUp": 3,
"thumbsDown": 3
}
]
[
{
"id": 42,
"joke": "What is the name to open the door?",
"punchline": "Open your chakra",
"category": "Classic",
"dateAdded": "1998-07-12T20:12:33.001Z",
"thumbsUp": 4,
"thumbsDown": 2
}
]
Response examples (201)
{
"id": "string",
"joke": "string",
"punchline": "string",
"category": "Word game",
"thumbsUp": 42,
"thumbsDown": 42,
"dateAdded": "2025-05-04T09:42:00Z"
}