Human API
An API where a
Hack Clubber
is the backend!
Log In with Hack Club

How does it work?
Step 1:
An api request is sent to https://api.human-api.hackclub.com
curl -X POST https://api.human-api.hackclub.app/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question":"Your Question Here"}'
This returns an ID and a status, in the following format -
{ id: "a1b2c3d4", status: "pending" }
Step 2:
An question is sent to #human-api on the Hack Club slack.
Step 3:
A Hack Clubber responds to the question by clicking either of the buttons, which is captured by another api request.
curl -H "Authorization: Bearer YOUR_API_KEY" "https://api.human-api.hackclub.app/ask/a1b2c3d4?wait=60"
This returns the response, answered by a human!!
200 -> { id, question, status: "pending" | "answered" | "expired", answer: "yes" | "no" | null, answered_by }
404 -> { error: "not found" }
401 -> { error: "invalid api key" }