REST API
Pakai malesngonten tanpa UI — cukup HTTP + API key. Cocok untuk script, bot, n8n, Zapier, atau backend kamu sendiri.
1. Auth
Setiap request (kecuali /health dan halaman publik) kirim header:
Authorization: Bearer mn_YOUR_KEY
Buat key di dashboard: Akun → API keys → REST API, atau set CONNECT_API_KEY di .env server.
2. Base URL
https://flowa.tigaawan.com
3. Contoh cepat
curl -s https://flowa.tigaawan.com/api/status \ -H "Authorization: Bearer mn_YOUR_KEY"
curl -s https://flowa.tigaawan.com/api/publish \
-H "Authorization: Bearer mn_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"media_type":"TEXT","text":"Halo dari API","publish":true}'
curl -s https://flowa.tigaawan.com/api/accounts/switch \
-H "Authorization: Bearer mn_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"main"}'
curl -s https://flowa.tigaawan.com/api/schedule \
-H "Authorization: Bearer mn_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"run_at":"2026-08-06T15:00","text":"Post terjadwal"}'
run_at: RFC3339 atau YYYY-MM-DDTHH:MM (WIB). Scheduler cek tiap ~1 menit.
4. Endpoint utama
| Method | Path | Fungsi |
|---|---|---|
| GET | /api/status | Status Threads/IG + akun aktif |
| GET | /api/me | Profil Threads |
| GET | /api/accounts | Daftar akun brand |
| POST | /api/accounts/switch | Ganti akun aktif |
| POST | /api/publish | Publish / buat container Threads (sekarang) |
| GET | /api/calendar?month=YYYY-MM | Kalender Lazy + jadwal manual |
| POST | /api/schedule | Jadwalkan post / utas (run_at) |
| GET | /api/schedule | Daftar antrian jadwal |
| POST | /api/schedule/{id}/cancel | Batalkan jadwal pending |
| GET | /api/container?id= | Cek status container |
| POST | /api/ai/generate | Generate utas (AI) |
| POST | /api/ai/carousel | Generate carousel |
| GET | /api/lazy/status | Status Lazy |
| POST | /api/lazy/run-now | Jalankan Lazy sekarang |
| GET | /api/ig/me | Profil Instagram |
| GET | /api/ig/media | List media IG |
| GET | /api/replies/pending | Balasan belum dijawab |
5. Spec mesin (opsional)
Kalau tool kamu butuh schema formal: /openapi.yaml
Token Threads/IG tetap disimpan di server (OAuth atau tempel di dashboard). Client API hanya kirim Bearer key malesngonten — tidak perlu bawa token Meta di tiap request.