Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MatthewSabia1/SubPirate-Pro/llms.txt
Use this file to discover all available pages before exploring further.
Campaign Management
Campaigns allow you to automate Reddit posts across multiple accounts and subreddits. Each campaign has:- Content versions with post title, body, and media
- Reddit account selection for posting
- Subreddit targets to post in
- Scheduling configuration with daily post targets and timezone
- Team collaboration with role-based permissions
Authentication
All campaign endpoints require authentication via Bearer token:Role-Based Access Control
Campaigns support four permission levels:| Role | Permissions |
|---|---|
| Owner | Full access (campaign creator, assigned via user_id) |
| Admin | Manage members, edit campaign, run campaigns, view all data |
| Editor | Edit campaign settings, run campaigns, view data |
| Viewer | Read-only access to campaign data |
campaign_members table. The campaign owner (via campaigns.user_id) automatically has admin rights.
GET /api/campaigns
This endpoint uses Supabase client-side queries. Access campaigns via:
- Campaigns owned by the user (
user_idmatches) - Campaigns where the user is a member (
campaign_memberstable)
Response Schema
Array of campaign objects
Example Request
POST /api/campaigns
This endpoint uses Supabase client-side mutations:
Request Body
Campaign name (max 255 characters)
Optional campaign description
Campaign objective or goal
Initial status:
draft, active, paused, or completedISO 8601 date (YYYY-MM-DD) when campaign should start
ISO 8601 date (YYYY-MM-DD) when campaign should end
Number of posts to attempt per day (must be >= 1)
IANA timezone identifier (e.g.,
America/New_York)Random time offset (±seconds) for scheduled runs
If true, shortfall from previous days carries over
Response
Returns the created campaign object (see GET response schema above).Example Request
GET /api/campaigns/:id
Access via Supabase:
Path Parameters
Campaign UUID
Response
Returns a single campaign object (see GET /api/campaigns schema).Errors
- 404: Campaign not found or user lacks access
- 403: User does not have permission to view this campaign
PATCH /api/campaigns/:id
Update via Supabase:
Path Parameters
Campaign UUID
Request Body
All fields are optional. Only provided fields will be updated.Campaign name
Campaign description
Campaign objective
Status:
draft, active, paused, or completedStart date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Daily post target (>= 1)
IANA timezone identifier
Random time offset for scheduling
Enable shortfall carry-over
Response
Returns the updated campaign object.Example Request
DELETE /api/campaigns/:id
Delete via Supabase:
- All campaign runs and attempts
- Campaign content versions
- Campaign members and invites
- Reddit account and subreddit associations
Path Parameters
Campaign UUID
Response
- 204: Campaign deleted successfully
- 403: User does not have permission to delete this campaign
- 404: Campaign not found