API reference
API reference
Every operation, generated from the OpenAPI document the API validates with.
Base URL https://api.groundsocial.dev. OpenAPI 3.1 at /openapi.json. Every response carries x-request-id; paid calls add x-credits-charged and x-credits-remaining.
| Request | What it does | Credits |
|---|---|---|
| `GET /v1/reddit/subreddits/{name}` | A subreddit: description, rules, member count, flags. | 1 |
| `GET /v1/reddit/subreddits/{name}/posts` | Posts in a subreddit, by hot, new, top, rising or controversial. | 1 |
| `GET /v1/reddit/posts/{id}` | One post with its full comment tree. | 1 |
| `POST /v1/reddit/posts/{id}/more` | Comments on a post, paginated, with "more" threads expanded. | 1 |
| `GET /v1/reddit/users/{name}` | A public user profile: karma, age, flags. | 1 |
| `GET /v1/reddit/users/{name}/posts` | Posts a user submitted. | 1 |
| `GET /v1/reddit/users/{name}/comments` | Comments a user wrote. | 1 |
| `GET /v1/reddit/search/posts` | Search posts across Reddit or in one subreddit. | 2 |
| `GET /v1/reddit/search/subreddits` | Find subreddits by name or topic. | 1 |
Agents
| Request | What it does | Credits |
|---|---|---|
| `POST /v1/agent/signup` | Create an account with no human: get an API key and a claim link. | 0 |
Claims
| Request | What it does | Credits |
|---|---|---|
| `GET /v1/claims/{token}` | What a claim link is for: the agent account, its credits, whether it was claimed. | 0 |
| `POST /v1/claims/{token}/accept` | Become the owner of an agent-created account. Its API key keeps working. | 0 |
Device login
| Request | What it does | Credits |
|---|---|---|
| `POST /v1/device/code` | Start a device login: show the person user_code and verification_uri, then poll. | 0 |
| `POST /v1/device/token` | Poll for the API key. Errors are the RFC 8628 codes. | 0 |
| `GET /v1/device/lookup` | Which client a pending user code belongs to, for the approval page. | 0 |
| `POST /v1/device/approve` | Approve a device login for one of your accounts, or decline it. | 0 |
Dashboard auth
| Request | What it does | Credits |
|---|---|---|
| `POST /v1/auth/email/start` | Email a 6-digit sign-in code. Same answer whether or not the address has an account. | 0 |
| `POST /v1/auth/email/verify` | Exchange the emailed code for a 30-day session. Creates the user on first sign-in. | 0 |
| `POST /v1/auth/logout` | End this session. | 0 |
| `GET /v1/me` | The signed-in person and every account they belong to, with balances. | 0 |
Dashboard keys
| Request | What it does | Credits |
|---|---|---|
| `GET /v1/accounts/{id}/keys` | The account’s API keys, with caps and spend so far. Never the secrets. | 0 |
| `POST /v1/accounts/{id}/keys` | Create a key. The secret is in this response only. | 0 |
| `PATCH /v1/accounts/{id}/keys/{key_id}` | Set or clear a key’s daily and monthly spend caps. Applies from its next call. | 0 |
| `DELETE /v1/accounts/{id}/keys/{key_id}` | Revoke a key. It stops working at once; revoking twice is a no-op. | 0 |
| `GET /v1/accounts/{id}/usage` | Calls, credits and errors per UTC day and per endpoint. Last 30 days by default. | 0 |
Billing
| Request | What it does | Credits |
|---|---|---|
| `POST /v1/billing/checkout` | A Stripe Checkout page for a credit pack. | 0 |
Credits
| Request | What it does | Credits |
|---|---|---|
| `POST /v1/credits/topup` | Add credits to your account, paid over MPP or x402, with no human. | 0 |
Platforms
| Request | What it does | Credits |
|---|---|---|
| `GET /v1/platforms` | Every platform, its status, and its endpoints with their prices. | 0 |