---
title: "API reference"
description: "Every operation, generated from the OpenAPI document."
canonical_url: https://groundsocial.dev/docs/api
---
# API reference

> Every operation, generated from the OpenAPI document.

> ## Agent Instructions
> The Groundsocial REST API is at https://api.groundsocial.dev (OpenAPI: https://groundsocial.dev/openapi.json). Set yourself up with https://groundsocial.dev/SKILL.md; the MCP server is https://api.groundsocial.dev/mcp. Every docs page is Markdown at its URL plus `.md`; the index is https://groundsocial.dev/llms.txt.

OpenAPI 3.1: [https://groundsocial.dev/openapi.json](https://groundsocial.dev/openapi.json). Base URL: `https://api.groundsocial.dev`.

## Reddit

- [`GET /v1/reddit/subreddits/{name}`](https://groundsocial.dev/docs/api/reddit-subreddit-get): A subreddit: description, rules, member count, flags.
- [`GET /v1/reddit/subreddits/{name}/posts`](https://groundsocial.dev/docs/api/reddit-subreddit-posts): Posts in a subreddit, by hot, new, top, rising or controversial.
- [`GET /v1/reddit/posts/{id}`](https://groundsocial.dev/docs/api/reddit-post-get): One post with its full comment tree.
- [`POST /v1/reddit/posts/{id}/more`](https://groundsocial.dev/docs/api/reddit-post-comments): Comments on a post, paginated, with "more" threads expanded.
- [`GET /v1/reddit/users/{name}`](https://groundsocial.dev/docs/api/reddit-user-get): A public user profile: karma, age, flags.
- [`GET /v1/reddit/users/{name}/posts`](https://groundsocial.dev/docs/api/reddit-user-posts): Posts a user submitted.
- [`GET /v1/reddit/users/{name}/comments`](https://groundsocial.dev/docs/api/reddit-user-comments): Comments a user wrote.
- [`GET /v1/reddit/search/posts`](https://groundsocial.dev/docs/api/reddit-search-posts): Search posts across Reddit or in one subreddit.
- [`GET /v1/reddit/search/subreddits`](https://groundsocial.dev/docs/api/reddit-search-subreddits): Find subreddits by name or topic.

## Agents

- [`POST /v1/agent/signup`](https://groundsocial.dev/docs/api/agent-signup): Create an account with no human: get an API key and a claim link.

## Claims

- [`GET /v1/claims/{token}`](https://groundsocial.dev/docs/api/claims-get): What a claim link is for: the agent account, its credits, whether it was claimed.
- [`POST /v1/claims/{token}/accept`](https://groundsocial.dev/docs/api/claims-accept): Become the owner of an agent-created account. Its API key keeps working.

## Device login

- [`POST /v1/device/code`](https://groundsocial.dev/docs/api/device-code): Start a device login: show the person user_code and verification_uri, then poll.
- [`POST /v1/device/token`](https://groundsocial.dev/docs/api/device-token): Poll for the API key. Errors are the RFC 8628 codes.
- [`GET /v1/device/lookup`](https://groundsocial.dev/docs/api/device-lookup): Which client a pending user code belongs to, for the approval page.
- [`POST /v1/device/approve`](https://groundsocial.dev/docs/api/device-approve): Approve a device login for one of your accounts, or decline it.

## Dashboard auth

- [`POST /v1/auth/email/start`](https://groundsocial.dev/docs/api/auth-email-start): Email a 6-digit sign-in code. Same answer whether or not the address has an account.
- [`POST /v1/auth/email/verify`](https://groundsocial.dev/docs/api/auth-email-verify): Exchange the emailed code for a 30-day session. Creates the user on first sign-in.
- [`POST /v1/auth/logout`](https://groundsocial.dev/docs/api/auth-logout): End this session.
- [`GET /v1/me`](https://groundsocial.dev/docs/api/me-get): The signed-in person and every account they belong to, with balances.

## Dashboard keys

- [`GET /v1/accounts/{id}/keys`](https://groundsocial.dev/docs/api/keys-list): The account’s API keys, with caps and spend so far. Never the secrets.
- [`POST /v1/accounts/{id}/keys`](https://groundsocial.dev/docs/api/keys-create): Create a key. The secret is in this response only.
- [`PATCH /v1/accounts/{id}/keys/{key_id}`](https://groundsocial.dev/docs/api/keys-caps): Set or clear a key’s daily and monthly spend caps. Applies from its next call.
- [`DELETE /v1/accounts/{id}/keys/{key_id}`](https://groundsocial.dev/docs/api/keys-revoke): Revoke a key. It stops working at once; revoking twice is a no-op.
- [`GET /v1/accounts/{id}/usage`](https://groundsocial.dev/docs/api/accounts-usage): Calls, credits and errors per UTC day and per endpoint. Last 30 days by default.

## Billing

- [`POST /v1/billing/checkout`](https://groundsocial.dev/docs/api/billing-checkout): A Stripe Checkout page for a credit pack.

## Credits

- [`POST /v1/credits/topup`](https://groundsocial.dev/docs/api/credits-topup): Add credits to your account, paid over MPP or x402, with no human.

## Platforms

- [`GET /v1/platforms`](https://groundsocial.dev/docs/api/platforms-list): Every platform, its status, and its endpoints with their prices.

_Canonical HTML: https://groundsocial.dev/docs/api_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial docs](https://groundsocial.dev/docs.md)
- [Quickstart](https://groundsocial.dev/docs/quickstart.md)
- [Authentication](https://groundsocial.dev/docs/authentication.md)
- [Credits and payments](https://groundsocial.dev/docs/payments.md)
- [Rate limits](https://groundsocial.dev/docs/rate-limits.md)
- [Errors](https://groundsocial.dev/docs/errors.md)
- [Data freshness and caching](https://groundsocial.dev/docs/freshness.md)
- [MCP server](https://groundsocial.dev/docs/mcp.md)
- [SKILL.md, llms.txt and Markdown twins](https://groundsocial.dev/docs/skill.md)
- [CLI](https://groundsocial.dev/docs/cli.md)
- [TypeScript SDK](https://groundsocial.dev/docs/sdk.md)
- [PRAW and snoowrap](https://groundsocial.dev/docs/praw.md)
- [Legal and compliance](https://groundsocial.dev/docs/compliance.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://groundsocial.dev/docs"},{"@type":"ListItem","position":3,"name":"API reference","item":"https://groundsocial.dev/docs/api"}]}
```
