Skylet
Join Skylet

Skylet API documentation

Version 1 · JSON over HTTPS · https://api.skylet.in/v1

Quick start

1. Create a key (you must be signed in). 2. Send it as a Bearer token. 3. Read the JSON.

curl https://api.skylet.in/v1/users/skylet \
  -H "Authorization: Bearer $SKYLET_KEY"

Or from JavaScript (Node 20+), with the small client in @skylet/sdk:

import { Skylet } from "@skylet/sdk";

const skylet = new Skylet({ apiKey: process.env.SKYLET_KEY });
const profile = await skylet.users.get("skylet");
const page = await skylet.feed.latest({ limit: 20 });
await skylet.posts.create({ body: "Hello from the API" }); // needs the posts.write permission

Authentication

Send the key in the Authorization header (Bearer sk_live_…) or in X-API-Key. Keys are for servers: never put one in a web page, app or public repository. If one leaks, revoke it in the portal; it stops working at once.

A key can only call the endpoints listed below, and only with the permission each one needs. Everything else (sign-in, settings, messages, ads and so on) is not available to keys.

PermissionWhat it allows
public.readRead public data. Profiles, posts, comments, hashtags, trending and the newest feeds. Only what anyone can see.
posts.writePost on your behalf. Create and delete posts and upload pictures or videos as the account that owns the key.
account.readRead your account. Your own profile details.

Reads with public.read return what a signed-out visitor sees. Calls with the other permissions act as the account that owns the key.

Endpoints

RequestPermissionUnitsWhat it does
GET/users/{handle}public.read1A person's or Page's public profile
GET/users/{handle}/postspublic.read1Their posts, newest first (cursor paging)
GET/posts/{id}public.read1One post with its pictures or video
GET/posts/{id}/commentspublic.read1Comments on a post, oldest first, with a short reply preview
GET/comments/{id}/repliespublic.read1More replies to a comment
GET/tags/{tag}/postspublic.read1Newest posts with a hashtag
GET/searchpublic.read1Search people, Pages, posts and hashtags
GET/trendingpublic.read1Hashtags taking off right now
GET/feed/latestpublic.read1Newest public posts across Skylet
GET/feed/latest-flickspublic.read1Newest Flicks (short videos)
GET/meaccount.read1The account that owns the key
POST/postsposts.write5Publish a post (text, pictures or one video)
DELETE/posts/{id}posts.write5Delete one of your posts
POST/mediaposts.write20Upload a picture or video to attach to a post (multipart)
GET/media/{id}posts.write1Check an upload (videos take a moment to prepare)

Field-by-field request and response shapes are in the interactive reference. Each endpoint above is the same one the Skylet website uses.

Paging

List endpoints take limit (up to 50) and cursor, and return { "items": [...], "nextCursor": "..." }. Pass nextCursor back as cursor for the next page; it is null on the last page. IDs are strings.

curl "https://api.skylet.in/v1/feed/latest?limit=20&cursor=102064570750738432" \
  -H "Authorization: Bearer $SKYLET_KEY"

Posting and uploading

With posts.write: upload pictures or a video as multipart/form-data (file part, ?purpose=post_image or flick), then attach the returned ids when you create the post. Videos take a moment to be prepared: poll GET /v1/media/{id} until its status is ready. Up to 4 pictures or one video of 90 seconds per post.

curl -X POST "https://api.skylet.in/v1/media?purpose=post_image" \
  -H "Authorization: Bearer $SKYLET_KEY" -F [email protected]
# => { "id": "1020...", "status": "ready", ... }

curl -X POST https://api.skylet.in/v1/posts \
  -H "Authorization: Bearer $SKYLET_KEY" -H "content-type: application/json" \
  -d '{ "body": "Hello from the API", "media": [{ "id": "1020...", "alt": "A sunrise over Mumbai" }] }'

Posts made through the API follow the same rules and moderation as posts made on the website.

Rate limits, units and pricing

  • Every successful request costs units: a read is 1, creating or deleting a post is 5, an upload is 20. Failed requests (4xx, 5xx) and rate-limited requests are free.
  • The first 10,000 units each month (UTC calendar month) are free.
  • After that, units are paid from prepaid credit at ₹5 per 1,000 units (plus GST). With no credit left, calls return 402 quota_exceeded until you add credit or the month ends.
  • Rate limit per key: 60 requests a minute, or 600 a minute while your account has credit.

Every response from a key carries RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset (seconds) and X-Units (what the call costs). When you exceed the limit you get 429 with Retry-After seconds. Usage is totalled every minute in the portal.

Errors

Errors are JSON: { "error": { "code": "...", "message": "...", "requestId": "..." } }. Quote the requestId when you contact us.

401invalid_api_keyThe key is wrong or was revoked.
403key_not_allowedThat endpoint is not part of the public API.
403missing_scopeThe key lacks the permission the endpoint needs.
403api_access_blockedDeveloper access for the account was switched off.
402quota_exceededFree units used up and no credit left.
429rate_limitedToo many requests: wait for Retry-After seconds.
503api_disabledThe developer API is switched off temporarily.

Rules

Use the API fairly. Do not scrape private information, spam, impersonate people or work around limits. Content rules and the Terms apply to everything you publish. We may switch off keys or accounts that abuse the API, and we may change prices or limits with notice in this portal.