Silly Server API
1.0.0

View as Markdown
Base URL
http://localhost:8080

API for Silly Server with chirping and authentication functionality.

This is version 1.0.0 of this API documentation. Last update on May 17, 2025.

Admin

Admin metrics

View as Markdown
GET /admin/metrics

Responses

  • 200

    Metrics report

GET /admin/metrics
curl \
 --request GET 'http://localhost:8080/admin/metrics'
POST /admin/reset

Responses

  • 200

    Server state reset

POST /admin/reset
curl \
 --request POST 'http://localhost:8080/admin/reset'

Chirps

Get all chirps

View as Markdown
GET /api/chirps

Responses

  • 200

    List of chirps

GET /api/chirps
curl \
 --request GET 'http://localhost:8080/api/chirps'

Create a chirp

View as Markdown
POST /api/chirps
application/json

Body Required

  • content string

Responses

  • 201

    Chirp created

POST /api/chirps
curl \
 --request POST 'http://localhost:8080/api/chirps' \
 --header "Content-Type: application/json" \
 --data '{"content":"string"}'
Request examples
{
  "content": "string"
}

Delete chirp by ID

View as Markdown
DELETE /api/chirps/{chirpID}

Path parameters

  • chirpID string Required

Responses

  • 204

    Chirp deleted

DELETE /api/chirps/{chirpID}
curl \
 --request DELETE 'http://localhost:8080/api/chirps/{chirpID}'

Healthz

GET /api/healthz

Responses

  • 200

    Server is healthy

GET /api/healthz
curl \
 --request GET 'http://localhost:8080/api/healthz'

Polka

Polka webhook endpoint

View as Markdown
POST /api/polka/webhooks

Responses

  • 200

    Webhook processed

POST /api/polka/webhooks
curl \
 --request POST 'http://localhost:8080/api/polka/webhooks'

Refresh

Refresh token

View as Markdown
POST /api/refresh

Responses

  • 200

    Token refreshed

POST /api/refresh
curl \
 --request POST 'http://localhost:8080/api/refresh'

Revoke

Revoke refresh token

View as Markdown
POST /api/revoke

Responses

  • 200

    Token revoked

POST /api/revoke
curl \
 --request POST 'http://localhost:8080/api/revoke'

Signin

POST /api/signin
application/json

Body Required

  • email string
  • password string

Responses

  • 200

    Authenticated

POST /api/signin
curl \
 --request POST 'http://localhost:8080/api/signin' \
 --header "Content-Type: application/json" \
 --data '{"email":"string","password":"string"}'
Request examples
{
  "email": "string",
  "password": "string"
}

Signup

POST /api/signup
application/json

Body Required

  • email string
  • password string

Responses

  • 201

    User created

POST /api/signup
curl \
 --request POST 'http://localhost:8080/api/signup' \
 --header "Content-Type: application/json" \
 --data '{"email":"string","password":"string"}'
Request examples
{
  "email": "string",
  "password": "string"
}