Reeve
API Reference

Connectors API

OAuth flows, available connectors, API key management, and webhook setup for third-party integrations.

Connectors API

The Connectors API manages third-party integrations — handling OAuth authorization flows, API key storage, token refresh, and connection lifecycle.

Authentication Methods

Reeve uses two methods depending on the platform:

MethodPlatformsHow It Works
OAuth 2.0Meta Ads, Google Ads, TikTok Ads, Shopify, GitHub, SlackClick Connect → authorize on the platform → redirected back
API KeyStripe, PostHog, Klaviyo, GA4, Gorgias, Zendesk, Vercel, RailwayPaste your key → validated and encrypted

Available Connectors

Commerce & Payments

ConnectorAuthTools Enabled
ShopifyOAuthreeve_shopify — products, orders, customers, revenue
StripeAPI Keyreeve_revenue — MRR, LTV, churn, subscriptions

Advertising

ConnectorAuthTools Enabled
Meta AdsOAuthreeve_ads — campaigns, ROAS, creative performance
Google AdsOAuthreeve_ads — search/display campaigns, keywords
TikTok AdsOAuthreeve_ads — short-form video campaign data

Marketing

ConnectorAuthTools Enabled
KlaviyoAPI Keyreeve_email — campaigns, flows, segments, SMS

Analytics

ConnectorAuthTools Enabled
PostHogAPI Keyreeve_analytics — funnels, sessions, feature flags
Google AnalyticsService Accountreeve_analytics — traffic, top pages, conversions

Customer Support

ConnectorAuthTools Enabled
GorgiasAPI Keyreeve_support — tickets, response times, CSAT
ZendeskAPI Keyreeve_support — tickets, agent performance

Communication

ConnectorAuthTools Enabled
SlackOAuthChannel messaging, bot access

Development

ConnectorAuthTools Enabled
GitHubOAuth/AppRepos, PRs, CI/CD, deployments
VercelAPI KeyDeployment status, domains, build logs
RailwayAPI KeyService status, deployment history
FigmaAPI KeyDesign files, components

OAuth Flow

Step 1: Initiate

The Cockpit sends a request to start the OAuth flow:

GET /api/oauth/{provider}/authorize
Authorization: Bearer <session-token>

Returns an authorization URL that redirects the user to the platform's consent screen.

Step 2: User Authorizes

The user reviews permissions and clicks Approve on the platform. The platform redirects back with an authorization code.

Step 3: Token Exchange

Reeve exchanges the authorization code for access and refresh tokens:

GET /api/oauth/{provider}/callback?code=abc123&state=xyz

Tokens are encrypted and stored. The connection is now active.

Step 4: Automatic Refresh

OAuth tokens are refreshed automatically before they expire. Meta tokens last ~60 days; Google tokens refresh indefinitely as long as the refresh token is valid.

Security

  • State parameter — CSRF protection with 10-minute TTL on state tokens
  • HMAC verification — Shopify callbacks include HMAC signature verification
  • Encrypted storage — Tokens encrypted at rest in PostgreSQL

API Key Flow

Connect

POST /api/connectors/connect
Authorization: Bearer <session-token>

{
  "provider": "stripe",
  "api_key": "sk_live_..."
}

The key is validated against the provider's API before storage. Invalid keys return an immediate error.

List Connections

GET /api/connectors/list
Authorization: Bearer <session-token>

Returns all connected platforms with status:

{
  "connections": [
    { "provider": "meta", "type": "oauth", "status": "connected" },
    { "provider": "stripe", "type": "api_key", "status": "connected" },
    { "provider": "shopify", "type": "oauth", "status": "disconnected" }
  ]
}

Disconnect

DELETE /api/connectors/{provider}
Authorization: Bearer <session-token>

Deletes stored tokens and revokes OAuth access where the provider supports it.

Webhooks

Some connectors support inbound webhooks for real-time updates:

ProviderWebhook Events
ShopifyOrder created, product updated, inventory changed
StripePayment succeeded, subscription updated, invoice created
GitHubPush events, PR opened, deployment status

Webhook URLs are automatically configured during connector setup. Events are routed to your agent as system events.

Multi-Brand Support

In multi-brand mode, connectors are scoped per brand. Each brand can have its own Shopify store, ad accounts, and analytics — all managed from a single Reeve account.

Connector credentials are scoped per user. Each team member connects their own accounts. The dashboard aggregates data across all connected accounts for the team.

On this page