Quickstart
Get started with the RelayAPI unified social media API in minutes.
Overview
RelayAPI is a unified API that lets you publish to 22 social, messaging, SMS, and newsletter channels with a single API call. Connect your accounts, create posts, and publish everywhere through one consistent interface.
Authentication
Hosted signup is currently invite-only. Existing hosted users can sign in; everyone else can request early access or follow the self-hosting guide. After you have an instance, create an API key from its dashboard.
Getting Your API Key
- Log in to your hosted or self-hosted RelayAPI dashboard
- Go to Settings > API Keys
- Click Create API Key
- Copy the key immediately — you won't be able to see it again
Key Format
API keys are prefixed with rlay_live_ for production or rlay_test_ for testing. Keys are stored as SHA-256 hashes and are only shown once at creation.
Choose a client
The TypeScript SDK is the canonical current client. Go and Java clients are generated and released separately. RelayAPI does not currently publish a Python package; the Python examples below use the REST API directly.
npm install @relayapi/sdkSet Up the Client
import Relay from '@relayapi/sdk';
const client = new Relay(); // reads RELAY_API_KEY from environmentConnect a Social Account
Before posting, connect at least one social media account through the dashboard or via the API.
const flow = await client.connect.startOAuthFlow('twitter');
// Redirect user to flow.auth_url to authorizeAvailable Platforms
See Platforms Overview for the full list of supported platforms and their capabilities.
Create and Publish a Post
const post = await client.posts.create({
content: 'Hello from RelayAPI!',
targets: ['twitter', 'linkedin'],
scheduled_at: 'now',
});
console.log(post.id); // "post_abc123"
console.log(post.status); // "published"Posting to Multiple Platforms
Target multiple accounts in a single API call. RelayAPI handles platform-specific formatting automatically.
Scheduling Posts
Schedule posts for future publishing by adding scheduled_at and timezone:
const post = await client.posts.create({
content: 'Scheduled post!',
targets: ['twitter'],
scheduled_at: '2024-01-16T12:00:00',
timezone: 'America/New_York',
});Supported Platforms
| Platform | Post | Schedule | Media | Analytics |
|---|---|---|---|---|
| Twitter/X | ✅ | ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ | ✅ | |
| ✅ | ✅ | ✅ | ✅ | |
| ✅ | ✅ | ✅ | ✅ | |
| TikTok | ✅ | ✅ | ✅ | ✅ |
| YouTube | ✅ | ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ | ✅ | |
| ✅ | ✅ | ✅ | ✅ | |
| Bluesky | ✅ | ✅ | ✅ | ✅ |
| Threads | ✅ | ✅ | ✅ | ✅ |
| Telegram | ✅ | ✅ | ✅ | — |
| Snapchat | ✅ | ✅ | ✅ | — |
| Discord | ✅ | ✅ | ✅ | — |
| Slack | ✅ | ✅ | ✅ | — |
| Mastodon | ✅ | ✅ | ✅ | — |
| ✅ | ✅ | ✅ | ✅ | |
| Google Business | ✅ | ✅ | ✅ | ✅ |
| SMS | ✅ | ✅ | ✅ | — |
| Beehiiv | ✅ | ✅ | Varies | — |
| Kit (ConvertKit) | ✅ | ✅ | Varies | — |
| Mailchimp | ✅ | ✅ | Varies | — |
| Listmonk | ✅ | ✅ | Varies | — |
The Analytics column means a live native account adapter. Stored cross-platform post metrics may still be available when RelayAPI has collected a snapshot. Provider account type, review, scopes, and media policy can narrow any capability; consult the relevant platform guide before depending on it.
What's Next?
- Platforms Overview — Learn about platform-specific features
- API Reference — Full endpoint documentation
- Guides — Step-by-step guides
Found something wrong? Help us improve this page.