pongdocs

Your computer

Host an API

Run an API on your pong's computer and call it from your other systems on a private link.

Ask pong to build an API and it runs it on your computer, then gives you a private link. Your other systems call that link with your secret key.

9:41
pong

Today 9:15 AM

👀
make a small api that returns my reading list as json. keep it up 9 to 5 on weekdays
it's up at trypong.app/h/Xk2…/api/books and answers 9:00 to 17:00 on weekdays. call it with the key from your developers page
+iMessage
$ curl trypong.app/h/Xk2…/api/books \
  -H "Authorization: Bearer pong_…"
[
  { "title": "Piranesi" },
  { "title": "The Idea Factory" }
]
Build it and put it up.

Calling it#

Send your secret key from the developer console as Authorization: Bearer. A call without it gets a 401. Opening the link in a browser asks you to sign in with your phone instead.

curl
curl https://trypong.app/h/<id>/api/books \
  -H "Authorization: Bearer $PONG_KEY"
JavaScript
const res = await fetch("https://trypong.app/h/<id>/api/books", {
  headers: { Authorization: `Bearer ${process.env.PONG_KEY}` },
});
const books = await res.json();

When it answers#

Your computer sleeps when nothing is working. Each service on the computer page has one setting for when it's up. You can also just tell pong, like "keep it up 8:00 to 12:00, Monday to Wednesday", and the page shows the same setting.

SettingWhat happensCost
With the computerRuns while your computer is awake. While it sleeps, calls time outFree
On a scheduleStays up between the times you pick, on the days you pick, in your timezoneUses API hours
Always onStays up all the time, and a call wakes the computerUses API hours
OffStopped until you turn it onFree

Each month includes 40 awake hours for your APIs, and they reset with your month. Only time an API keeps the computer awake counts: texts, the files page and real work don't. You can add more hours, which last 60 days, or keep the computer on all the time. About an hour before the hours run out, pong texts you that the APIs are about to stop. When they run out, the APIs stop and pong texts you that they have stopped, with the link to add hours. Add 40 more for CA$12, or keep your APIs on all the time for CA$99 for 30 days, from API hours on your dashboard. See Pricing.

Limits#

Rate limitNone
Calls waiting at onceUp to 32
Request and response size1 MB each
Time to answer8 seconds, or 45 if the call had to wake the computer
ProtocolPlain HTTP. No WebSockets or streaming

See it and stop it#

The computer page on your dashboard shows each service, what it's doing in plain words, and one setting: Off, With the computer, On a schedule or Always on. Tap a service to read its live log. To take the link down, ask pong.

The computer page: what the machine is, API hours, and each service with its one setting
dashboard → computer: each service, what it's doing, and its setting.
pong can also publish a plain website on the same link. A website stays up even while your computer sleeps.

Something missing or wrong? Tell pong, or email founders@vira-labs.com.