API for developers
A simple REST API to manage your own events and blog posts from an external app.
1. Authentication
The API uses Bearer tokens. Generate one for your account in Account settings → API. The token is shown only once — store it somewhere safe.
Send it in every request:
Authorization: Bearer <token>
Accept: application/json
Base URL:
https://dev.taptime.fun/api/v1
Every endpoint below only exposes resources owned by the token's user — you cannot read or modify other users' events or posts.
2. Events
| GET | /events | List your own events (paginated) |
| POST | /events | Create a new event |
| GET | /events/{id} | Show an event |
| PATCH | /events/{id} | Update an event |
| DELETE | /events/{id} | Delete an event |
| POST | /events/{id}/images | Upload photos (multipart, images[] field) |
| DELETE | /events/{id}/images/{imageId} | Delete a photo |
| POST | /events/{id}/images/{imageId}/primary | Set the primary photo |
Fields (create/update)
| Field | Type / allowed values |
|---|---|
| title | string, 3–100 chars, required |
| description | string, max 5000 |
| type | drink | food | sport | culture | party | walk | work | game | other |
| starts_at | ISO 8601 datetime, required |
| ends_at | ISO 8601 datetime, after starts_at |
| location_name | string, max 100 |
| location_address | string, max 200 |
| latitude / longitude | float |
| is_public | boolean |
| join_mode | open | password | tickets |
| join_password | string, required if join_mode=password |
| max_participants | integer, 2–100 |
| age_min / age_max | integer, 1–120 |
| gender_restriction | male | female |
| price_czk | numeric, 0–10000 |
| price_note | string, max 50 |
| status (update only) | active | cancelled |
Example — create an event
curl -X POST https://dev.taptime.fun/api/v1/events \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"title": "Pivo na terase",
"type": "drink",
"starts_at": "2027-06-01T18:00:00+02:00",
"join_mode": "open"
}'
Example response
{
"data": {
"id": "eoQ1wr",
"title": "Pivo na terase",
"type": "drink",
"status": "active",
"starts_at": "2027-06-01T16:00:00+00:00",
"join_mode": "open",
"is_public": true,
"current_participants": 1,
"images": [],
"url": "https://dev.taptime.fun/events/eoQ1wr"
}
}
Uploading photos
Multipart upload, one or more files under the images[] field (max 5 MB each). The first photo uploaded to an event with no photos becomes the primary one automatically.
curl -X POST https://dev.taptime.fun/api/v1/events/eoQ1wr/images \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json" \
-F "images[]=@photo1.jpg" \
-F "images[]=@photo2.jpg"
3. Blog posts
| GET | /posts | List your own posts (paginated) |
| POST | /posts | Create a post |
| GET | /posts/{slug} | Show a post |
| PATCH | /posts/{slug} | Update a post |
| DELETE | /posts/{slug} | Delete a post |
| POST | /posts/{slug}/cover | Upload/replace the cover image (multipart, cover field) |
| DELETE | /posts/{slug}/cover | Delete the cover image |
Posts are addressed by slug (not numeric id) in the URL, matching the public blog URLs.
Fields (create/update)
| Field | Type / allowed values |
|---|---|
| title | string, 3–150 chars, required |
| categories | array, 1–3 items, required — see below |
| event_id | integer, must be one of your events |
| location | string, max 150 |
| excerpt | string, max 300 |
| body | HTML string, max 20000, required |
| status | draft | published (default draft) |
Allowed category values
Example — create a post
curl -X POST https://dev.taptime.fun/api/v1/posts \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"title": "Jak jsme objevili Kutnou Horu",
"categories": ["mista"],
"body": "<p>Text příspěvku…</p>",
"status": "published"
}'
Cover image
curl -X POST https://dev.taptime.fun/api/v1/posts/jak-jsme-objevili-kutnou-horu/cover \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json" \
-F "cover=@cover.jpg"
4. Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid token |
| 403 | The resource belongs to another user |
| 404 | Resource not found |
| 422 | Validation failed — see the errors object |
422 responses look like:
{
"message": "Toto pole je povinné. (and 1 more error)",
"errors": {
"title": ["Toto pole je povinné."],
"type": ["Toto pole je povinné."]
}
}