Skip to main content
RapidDev - Software Development Agency
lovable-integrationsEdge Function Integration

How to Integrate Lovable with Sendible

To integrate Sendible with Lovable, store your Sendible API key in Cloud → Secrets and create an Edge Function that proxies calls to the Sendible API. Sendible is an agency-focused social media scheduling platform with white-label capabilities — unlike Sprout Social which targets enterprise teams, Sendible is designed for agencies managing multiple client social accounts from a single dashboard, making it the right choice when your Lovable app needs to schedule posts across client social profiles.

What you'll learn

  • How to find your Sendible API key and store it in Lovable Cloud → Secrets
  • How to create an Edge Function that schedules social media posts via the Sendible API
  • How to retrieve available Sendible social accounts and profiles for use in post scheduling
  • How to build a content calendar form in Lovable that schedules posts across multiple social platforms
  • When to choose Sendible over Sprout Social or SocialBee for agency social media management
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate16 min read30 minutesMarketingMarch 2026RapidDev Engineering Team
TL;DR

To integrate Sendible with Lovable, store your Sendible API key in Cloud → Secrets and create an Edge Function that proxies calls to the Sendible API. Sendible is an agency-focused social media scheduling platform with white-label capabilities — unlike Sprout Social which targets enterprise teams, Sendible is designed for agencies managing multiple client social accounts from a single dashboard, making it the right choice when your Lovable app needs to schedule posts across client social profiles.

Add social media scheduling and agency account management to Lovable with Sendible

Sendible was built specifically for social media agencies — teams that manage social accounts for multiple clients from a single platform. Its white-label branding options let agencies present Sendible as their own tool to clients, and its multi-account architecture makes it easy to switch between managing a restaurant's Instagram, a tech startup's Twitter, and a retail brand's Facebook without logging in and out of separate accounts. If you are building a Lovable app for an agency workflow, Sendible is the social scheduling tool most likely to match your use case.

Lovable has no native Sendible connector, so social media scheduling flows through a server-side Edge Function. Your Lovable app collects post content, selects target social accounts, and optionally picks a schedule time, then calls the Edge Function. The function authenticates to Sendible with your API key and schedules the post via the Sendible API. Sendible handles the actual posting to Twitter, Facebook, Instagram, LinkedIn, and other connected platforms at the specified time.

Sendible's API uses token-based authentication where your API key is passed as a query parameter or in the Authorization header depending on the endpoint. Social accounts in Sendible are called 'services', and each service has a numeric ID that you reference when scheduling posts. The API supports scheduling posts, retrieving post history, and accessing basic analytics for scheduled content. This guide covers getting your API key, finding service IDs for your connected social accounts, and building the scheduling Edge Function.

Integration method

Edge Function Integration

Sendible has no native Lovable connector. Social media post scheduling, account management, and analytics retrieval are handled via a Lovable Edge Function that calls the Sendible API. The API key is stored in Cloud → Secrets and accessed via Deno.env.get(), keeping credentials server-side and preventing CORS errors from direct browser API calls.

Prerequisites

  • A Lovable project with Lovable Cloud enabled (Edge Functions require Lovable Cloud)
  • A Sendible account with at least one connected social media account (sendible.com — plans start at $29/month)
  • Your Sendible API key (Sendible → Settings → API → Generate API key)
  • The Sendible Service IDs for the social accounts you want to post to (retrievable via the GET /services endpoint or visible in the Sendible URL when managing a service)
  • Basic understanding of Sendible's concepts: 'services' are connected social accounts, 'queue' is scheduled posts, 'messages' are post content

Step-by-step guide

1

Get your Sendible API key and find your service IDs

Gather the credentials and service identifiers needed for the Sendible integration. To get your API key: log in to Sendible and go to Settings (click your profile in the top-right corner, then Settings). Navigate to the API section (sometimes listed under 'Developer' or 'Integrations' in the settings sidebar). Click 'Generate API key' or copy the existing key. Your Sendible API key is a string that authenticates all API requests. To find your service IDs: in Sendible, service IDs are the numeric identifiers for each connected social account. The easiest way to find them is via the Sendible API itself. Once you have your API key, you can call GET https://api.sendible.com/api/v2/services.json?api_key=YOUR_KEY to retrieve a list of all your connected services with their IDs, names, and types (Facebook, Twitter, Instagram, LinkedIn, etc.). Copy the service IDs for the accounts you want to use in your Lovable integration. Alternatively, service IDs may appear in the URL when you click on a specific social account in the Sendible interface — look for a numeric ID in the URL path. Note the service IDs as comma-separated values or as a list — you will store the default service IDs as a secret so your Edge Function knows which social accounts to post to by default, while still allowing custom service ID selection from the frontend.

Pro tip: Sendible service IDs are stable — they do not change when you reconnect a social account after a token expiry. However, if you disconnect and reconnect a social account in Sendible, a new service may be created with a new ID. Keep your service IDs updated in secrets if you regularly reconnect accounts.

Expected result: You have your Sendible API key and the numeric service IDs for your connected social accounts ready to store as secrets.

2

Add Sendible credentials to Lovable Cloud Secrets

Store your Sendible credentials in Lovable's Cloud Secrets panel. In your Lovable project, click the '+' icon at the top of the editor to open the Cloud panel. Click the 'Secrets' tab and add the following secrets. First secret — Name: SENDIBLE_API_KEY, Value: your Sendible API key. This authenticates all API requests as a query parameter or header. Optional second secret — Name: SENDIBLE_DEFAULT_SERVICE_IDS, Value: a comma-separated list of default service IDs to use when no specific services are selected (e.g., '12345,67890,11111'). This is useful for apps where all posts should go to the same accounts by default. Sendible's API authentication passes the API key as a query parameter (api_key=YOUR_KEY) appended to the endpoint URL. This is a less common pattern than header-based auth, and the Edge Function must append the API key to every URL rather than adding it as a header. The code in Step 3 handles this correctly, but it means your API key will appear in server-side request logs — ensure you are using the Cloud → Secrets storage and not hardcoding it. For agency use cases where different clients have different Sendible accounts, consider storing multiple API keys with client-specific suffixes: SENDIBLE_API_KEY_CLIENT1, SENDIBLE_API_KEY_CLIENT2, etc.

Pro tip: Sendible's API uses query parameter authentication (api_key=YOUR_KEY in the URL). While this is less elegant than header-based auth, it is still secure when used server-side from an Edge Function — the key never reaches the browser. Never pass the API key as a query parameter from your frontend code.

Expected result: SENDIBLE_API_KEY (and optionally SENDIBLE_DEFAULT_SERVICE_IDS) appear in your Cloud → Secrets panel with values masked.

3

Create the Sendible post scheduling Edge Function

Create the Edge Function that schedules social media posts and optionally retrieves available services. The Sendible API v2 uses the base URL https://api.sendible.com/api/v2/ with the API key as a query parameter. For scheduling a post, the endpoint is POST https://api.sendible.com/api/v2/messages.json?api_key={key}. The request body is form-encoded (application/x-www-form-urlencoded) and includes: message (the post text), service_ids (comma-separated service IDs to post to), and optionally date_time for scheduled posts (in the format YYYY-MM-DD HH:MM:SS in UTC) or leave empty to post immediately. For retrieving services, the endpoint is GET https://api.sendible.com/api/v2/services.json?api_key={key}. This returns an array of service objects with id, name, type, and status fields. Sendible's API returns different HTTP status codes depending on the operation: 200 or 201 for successful posts, and an error object with a status and message field for failures. Rate limits apply — the API allows a certain number of requests per minute based on your plan tier. The Edge Function below handles both post scheduling (action='schedule') and service retrieval (action='get-services'), making it a complete social media scheduling proxy.

Lovable Prompt

Create an Edge Function called sendible-social at supabase/functions/sendible-social/index.ts. Handle action='schedule' (schedule a post with message, serviceIds, scheduledAt) and action='get-services' (return available social accounts). Use SENDIBLE_API_KEY from Deno env as a query parameter in all API URLs. For scheduling, POST to /api/v2/messages.json with form-encoded data. For services, GET /api/v2/services.json. Include CORS headers.

Paste this in Lovable chat

supabase/functions/sendible-social/index.ts
1import { serve } from 'https://deno.land/std@0.168.0/http/server.ts'
2
3const corsHeaders = {
4 'Access-Control-Allow-Origin': '*',
5 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
6}
7
8const SENDIBLE_BASE = 'https://api.sendible.com/api/v2'
9
10serve(async (req) => {
11 if (req.method === 'OPTIONS') {
12 return new Response('ok', { headers: corsHeaders })
13 }
14
15 try {
16 const body = await req.json()
17 const { action } = body
18
19 const apiKey = Deno.env.get('SENDIBLE_API_KEY')
20 if (!apiKey) throw new Error('Missing required secret: SENDIBLE_API_KEY')
21
22 if (action === 'get-services') {
23 const res = await fetch(`${SENDIBLE_BASE}/services.json?api_key=${apiKey}`)
24 if (!res.ok) {
25 const err = await res.json().catch(() => ({}))
26 throw new Error(`Sendible services error ${res.status}: ${JSON.stringify(err)}`)
27 }
28 const data = await res.json()
29 // Normalize to a clean array
30 const services = (data.services || data || []).map((s: Record<string, unknown>) => ({
31 id: s.id,
32 name: s.name,
33 type: s.profile_type || s.type,
34 }))
35 return new Response(
36 JSON.stringify({ success: true, services }),
37 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
38 )
39 }
40
41 if (action === 'schedule') {
42 const { message, serviceIds, scheduledAt = '' } = body
43 if (!message) throw new Error('message is required for schedule action')
44 if (!serviceIds || serviceIds.length === 0) throw new Error('serviceIds array is required and must not be empty')
45
46 const formData = new URLSearchParams()
47 formData.append('message', message)
48 formData.append('service_ids', Array.isArray(serviceIds) ? serviceIds.join(',') : serviceIds)
49 if (scheduledAt) formData.append('date_time', scheduledAt)
50
51 const res = await fetch(`${SENDIBLE_BASE}/messages.json?api_key=${apiKey}`, {
52 method: 'POST',
53 headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
54 body: formData.toString(),
55 })
56
57 const data = await res.json().catch(() => ({}))
58 if (!res.ok) {
59 throw new Error(`Sendible schedule error ${res.status}: ${JSON.stringify(data)}`)
60 }
61
62 return new Response(
63 JSON.stringify({ success: true, message: 'Post scheduled successfully', data }),
64 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
65 )
66 }
67
68 throw new Error(`Unknown action: ${action}. Use 'schedule' or 'get-services'.`)
69 } catch (error) {
70 return new Response(
71 JSON.stringify({ error: error.message }),
72 { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
73 )
74 }
75})

Pro tip: Sendible's date_time parameter for scheduled posts expects UTC time in the format 'YYYY-MM-DD HH:MM:SS'. If your frontend collects local time from a datetime picker, convert it to UTC before sending to the Edge Function: new Date(localDatetime).toISOString().replace('T', ' ').slice(0, 19).

Expected result: The sendible-social Edge Function is deployed. Test the get-services action first to verify your API key works and retrieve the available service IDs. Then test the schedule action with a future timestamp to schedule a test post.

4

Build the social media scheduling form in your Lovable app

With the Edge Function deployed, build the content scheduling interface in your Lovable app. The form should fetch available social accounts on mount (using the get-services action) and display them as checkboxes or a multi-select. Users write their post content, select target social accounts, and optionally set a schedule time. For a content calendar application, the scheduling form is the core workflow. Consider adding a character counter that shows platform-specific limits — Twitter/X has a 280-character limit (or higher on paid accounts), LinkedIn has a 3,000-character limit for posts. Display platform-specific warnings when content exceeds each platform's limit. The date/time picker for scheduled posts should default to a time in the future (not the current time) to prevent accidental immediate posting. A common UX pattern is to default to the next hour rounded to the nearest 15 minutes. All times should be sent to the Edge Function in UTC to avoid timezone confusion. For immediate posting (no scheduled time), skip the scheduledAt parameter or pass an empty string — the Edge Function handles this by checking if scheduledAt is empty before appending it to the form data.

Lovable Prompt

Create a social media post scheduling form with: a textarea for the post message, checkboxes for social accounts (fetch from sendible-social with action='get-services' on mount), a datetime picker for scheduled time, and a 'Schedule Post' button. When submitted, call sendible-social with action='schedule' and the selected service IDs. Show a loading state and success/error feedback. Display a character count for the message.

Paste this in Lovable chat

src/components/SocialScheduler.tsx
1import { useState, useEffect } from 'react'
2import { supabase } from '@/lib/supabase'
3import { Button } from '@/components/ui/button'
4import { Textarea } from '@/components/ui/textarea'
5import { Checkbox } from '@/components/ui/checkbox'
6import { Label } from '@/components/ui/label'
7import { Input } from '@/components/ui/input'
8import { toast } from '@/components/ui/use-toast'
9
10interface Service { id: string; name: string; type: string }
11
12export const SocialScheduler = () => {
13 const [message, setMessage] = useState('')
14 const [services, setServices] = useState<Service[]>([])
15 const [selectedIds, setSelectedIds] = useState<string[]>([])
16 const [scheduledAt, setScheduledAt] = useState('')
17 const [loading, setLoading] = useState(false)
18
19 useEffect(() => {
20 supabase.functions.invoke('sendible-social', { body: { action: 'get-services' } })
21 .then(({ data }) => setServices(data?.services || []))
22 .catch(() => toast({ title: 'Could not load social accounts', variant: 'destructive' }))
23 }, [])
24
25 const toggleService = (id: string) =>
26 setSelectedIds((prev) => prev.includes(id) ? prev.filter((s) => s !== id) : [...prev, id])
27
28 const handleSubmit = async (e: React.FormEvent) => {
29 e.preventDefault()
30 if (selectedIds.length === 0) {
31 toast({ title: 'Select at least one social account', variant: 'destructive' })
32 return
33 }
34 setLoading(true)
35 try {
36 const { error } = await supabase.functions.invoke('sendible-social', {
37 body: { action: 'schedule', message, serviceIds: selectedIds, scheduledAt },
38 })
39 if (error) throw error
40 toast({ title: scheduledAt ? 'Post scheduled!' : 'Post published!' })
41 setMessage('')
42 setSelectedIds([])
43 setScheduledAt('')
44 } catch (err) {
45 toast({ title: 'Scheduling failed', description: 'Please try again.', variant: 'destructive' })
46 } finally {
47 setLoading(false)
48 }
49 }
50
51 return (
52 <form onSubmit={handleSubmit} className="space-y-4 max-w-lg">
53 <div>
54 <Label>Message ({message.length}/280)</Label>
55 <Textarea value={message} onChange={(e) => setMessage(e.target.value)} placeholder="What would you like to share?" rows={4} required />
56 </div>
57 <div>
58 <Label>Social Accounts</Label>
59 <div className="space-y-2 mt-1">
60 {services.map((s) => (
61 <div key={s.id} className="flex items-center gap-2">
62 <Checkbox checked={selectedIds.includes(s.id)} onCheckedChange={() => toggleService(s.id)} />
63 <span className="text-sm">{s.name} ({s.type})</span>
64 </div>
65 ))}
66 </div>
67 </div>
68 <div>
69 <Label>Schedule Time (optional leave blank to post now)</Label>
70 <Input type="datetime-local" value={scheduledAt} onChange={(e) => setScheduledAt(e.target.value)} />
71 </div>
72 <Button type="submit" disabled={loading}>{loading ? 'Scheduling...' : 'Schedule Post'}</Button>
73 </form>
74 )
75}

Pro tip: For agency apps managing multiple client social accounts, RapidDev's team can help build a multi-client Sendible integration where each client has separate API keys and service sets, with a clean client-switching UI.

Expected result: The social media scheduling form loads with checkboxes for each connected Sendible social account. Submitting schedules the post in Sendible — verify it appears in your Sendible queue or publishes immediately if no schedule time was set.

Common use cases

Schedule social media posts from a Lovable content calendar app

Build a content calendar in Lovable where users can write post content, select target social accounts, and pick a scheduled date and time. The Edge Function schedules each post to the selected Sendible services (social accounts). Sendible queues the posts and publishes them at the scheduled time without further interaction from your app.

Lovable Prompt

Create an Edge Function called sendible-schedule-post that accepts { message, serviceIds, scheduledAt } where serviceIds is an array of Sendible service IDs and scheduledAt is an ISO timestamp. Use SENDIBLE_API_KEY from secrets to authenticate. Call the Sendible API to schedule the post to all selected services. Return the scheduled post IDs or error details. Then create a content scheduling form in my app with a text area, service selector, and date/time picker.

Copy this prompt to try it in Lovable

Retrieve and display available social accounts for a scheduling dashboard

When users open the post scheduling interface in your Lovable app, fetch their connected Sendible services (social accounts) to populate a dropdown or checkbox list. Users can then select which accounts to post to. This replaces hardcoded service IDs with a dynamic list that updates automatically when the user connects new social accounts in Sendible.

Lovable Prompt

Create an Edge Function called sendible-get-services that calls the Sendible API to retrieve all available services (connected social accounts). Use SENDIBLE_API_KEY from secrets. Return an array of { id, name, type } objects so my frontend can display a list of social accounts to schedule posts to. Add a service selector to my post scheduling form that calls this function on mount.

Copy this prompt to try it in Lovable

Post agency client content to multiple social networks simultaneously

In an agency workflow, content managers create posts for a client and need to publish to that client's Facebook, Twitter, and LinkedIn in one action. Your Lovable app calls the Sendible Edge Function with the message and an array of service IDs for all three of the client's social accounts. Sendible schedules or immediately publishes to all three platforms simultaneously.

Lovable Prompt

Create a multi-platform post form for my agency app. Accept a message, image URL, and an array of social profile IDs. Call sendible-schedule-post with the content and selected service IDs. If no schedule time is provided, post immediately. Show the status of each platform's post separately — Facebook posted, Twitter posting, LinkedIn queued. Use Sendible's API to check post status.

Copy this prompt to try it in Lovable

Troubleshooting

Sendible API returns 401 or 'Invalid API key' for all requests

Cause: The SENDIBLE_API_KEY is incorrect, the API key has been regenerated in Sendible settings, or there is extra whitespace in the stored secret value.

Solution: Go to Sendible → Settings → API and verify the current API key. If it has changed, update SENDIBLE_API_KEY in Cloud → Secrets and trigger an Edge Function redeployment. Also check that the secret value has no leading or trailing spaces — these are invisible but will cause authentication failures.

Post scheduling returns 200 but the post does not appear in Sendible or on social media

Cause: The service IDs passed to the schedule endpoint are invalid or refer to disconnected social accounts. Sendible may accept the API call without error even if some service IDs are invalid.

Solution: Call the get-services action to retrieve the current list of active service IDs and verify the IDs you are passing match active services in Sendible. Check that the social account is still connected and authorized in Sendible → Services — social media platform tokens expire regularly and must be re-authorized.

Scheduled posts appear in Sendible but fail to publish at the scheduled time

Cause: The social media account's authorization token has expired (common with Instagram, Facebook, and LinkedIn which require periodic token refreshes). Sendible queues the post but cannot publish because the platform credentials are invalid.

Solution: In Sendible, go to Services and check the status of the social account — a red or warning indicator means the token needs to be refreshed. Click the account and re-authorize it with the social media platform. The scheduled posts in Sendible's queue should then publish at their scheduled time.

CORS error when the frontend tries to call the Sendible API directly

Cause: The frontend code is calling Sendible's API URL directly (api.sendible.com) instead of going through the Lovable Edge Function. Sendible's API does not support browser CORS requests.

Solution: All Sendible API calls must go through the Edge Function at supabase/functions/sendible-social. Replace any direct fetch calls to api.sendible.com in your React code with supabase.functions.invoke('sendible-social', { body: { action: '...', ... } }).

Best practices

  • Always validate that at least one service ID is selected before calling the schedule action — posting with an empty serviceIds array will fail with a confusing API error rather than a helpful validation message.
  • Fetch available services dynamically from the get-services action rather than hardcoding service IDs — social account IDs can change when accounts are disconnected and reconnected in Sendible.
  • Convert all schedule times to UTC before sending to the Edge Function to avoid timezone-related post timing issues — use new Date(localDateTime).toUTCString() in your React code.
  • Implement a character counter in your post composition interface that shows platform-specific limits — Twitter has a 280-character limit while LinkedIn and Facebook allow much longer posts.
  • Store your Sendible API key in Cloud → Secrets and never pass it as a URL parameter in frontend code — the query parameter auth pattern Sendible uses can make it tempting to call the API directly from the browser, which exposes your key.
  • For agency workflows, consider adding a 'client' field to your Lovable post scheduling form and routing to different Sendible API keys or service sets based on which client the content is for.
  • Set up Sendible's email notifications for failed posts so you are alerted if a social account token expires and scheduled posts start failing — don't rely solely on the Lovable UI to surface these issues.

Alternatives

Frequently asked questions

What social networks does Sendible support for scheduling?

Sendible supports scheduling to Facebook (pages and groups), Twitter/X, Instagram (business accounts), LinkedIn (profiles and company pages), Google My Business, YouTube, Pinterest, and several others. The specific networks available depend on your Sendible plan tier. Each connected account appears as a 'service' in the API — the get-services endpoint returns all currently connected accounts with their platform type.

Does Sendible's API support uploading images with posts?

Sendible's API supports media attachments for posts. You can include an image URL (media_url parameter) or upload a file directly. For a Lovable integration, the most practical approach is to store images in Lovable Cloud Storage (Supabase Storage), generate a public URL, and pass that URL to the Sendible scheduling endpoint. Instagram posts via the API require images to meet specific size requirements — check Sendible's API documentation for the current image format requirements per platform.

How does Sendible compare to Sprout Social for a Lovable app?

Sendible is designed for agencies managing multiple client social accounts at an affordable price (starting at $29/month). Sprout Social is an enterprise tool (starting at $249/month) with advanced analytics, social listening, and complex team workflows. For a Lovable app targeting small to mid-size agencies, Sendible's API coverage and price point are more appropriate. Sprout Social's API has more comprehensive analytics endpoints if post performance data is a core part of your Lovable app.

Can I delete or reschedule posts from Lovable via the Sendible API?

Yes, Sendible's API includes endpoints for retrieving scheduled posts (GET /messages.json), updating post content and timing (PUT /messages/{id}.json), and deleting scheduled posts (DELETE /messages/{id}.json). To reschedule a post, retrieve its ID from the schedule response, then call the update endpoint with the new date_time value. The Edge Function can be extended to support these operations with additional action types.

What Sendible plan do I need for API access?

API access is available on all Sendible paid plans. The Creator plan ($29/month) includes the API and supports up to 1 user and 6 social profiles. The Traction plan and above support multiple users and more social profiles, which is the typical requirement for agency use cases. There is no free plan — Sendible offers a 14-day free trial that includes API access for testing your Lovable integration before committing to a paid plan.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.