Unipile Compatibility
Every Unipile v1 route that works with Instagram, and what Lempile does with it: the same, the same with differences, 501, or not served yet.
Early access. Tell us what you're building and we'll set you up. Contact us
Every Unipile v1 route that works with an Instagram account, and what Lempile
does with it. The base URL is https://api.lempile.com/api/v1, with Unipile's
paths after it.
- Same: Unipile's path, parameters, answer shape and status.
- Same, but: answered, with the differences listed.
- 501: answers
501 errors/feature_not_implementedwith adetailsaying why. Nothing is done, so a client can fall back. - Not yet: not served yet; answers
404("Route not found.").
On every route, account_id also takes the account's Instagram id or username,
and a person also takes a username, @username or profile link. A person's
numeric Instagram id works once the account has seen that person (in a chat, a
follower list, a profile read); otherwise it answers 400 and asks for the
username.
Accounts And Hosted Auth#
| Unipile route | Lempile | Notes |
|---|---|---|
GET /accounts |
Same, but | Lempile's own list: { "object": "list", "count", "items" }, every network of the workspace, each with provider (instagram) and status. No cursor, total_count or status_counts. |
GET /accounts/{account_id} |
Same, but | sources[].status is OK, CONNECTING, CREDENTIALS or ERROR. |
POST /accounts (username and password) |
Same, but | Answers within 60 seconds: AccountCreated, or a Checkpoint (202). The account gets its own Lempile IP. Early access: 403 errors/feature_not_subscribed until Instagram is open to the workspace. |
POST /accounts (sessionid cookie) |
501 | Instagram ends a session that moves to a new device and IP. |
POST /accounts (unilogin) |
501 | |
POST /accounts/checkpoint |
Same | OTP, 2FA, IN_APP_VALIDATION; TRY_ANOTHER_WAY. 5 minutes per sign-in. |
POST /accounts/checkpoint/resend |
Same | Instagram's own "Send again". |
POST /accounts/{account_id} (reconnect) |
Same, but | Username and password only. The account keeps its id and its IP. |
POST /hosted/accounts/link |
Same, but | The page is Lempile's (lempile.com/connect/instagram?token=…). 24 hours at most. A new account joins the key's workspace. |
PATCH /accounts/{account_id} |
Not yet | |
DELETE /accounts/{account_id} |
Same | |
POST /accounts/{account_id}/restart |
Not yet | |
GET /accounts/{account_id}/sync |
501 | Unipile doesn't do it for Instagram either. Use GET /chats/{chat_id}/sync. |
Messaging#
| Unipile route | Lempile | Notes |
|---|---|---|
GET /chats |
Same, but | account_id required. unread, before, after: 501. Message requests have folder: ["PENDING"]. |
GET /chats/{chat_id} |
Same, but | account_id required. Opens the conversation only when the inbox can't answer (marks_seen). Also takes the chat's instagram.com/direct/t/<id>/ link. |
GET /chats/{chat_id}/messages |
Same, but | account_id required. before, after, sender_id: 501. Opens the conversation only when the inbox can't answer (marks_seen). A message's id is <chat id>_<Instagram's message id>. |
POST /chats/{chat_id}/messages |
Same, but | Idempotency-Key required. JSON or multipart/form-data. Text up to 1,000 characters. quote_id is Instagram's Reply. Voice notes as .m4a in attachments or voice_message. mentions, thread_id, typing_duration, video_message: 400. |
POST /chats |
Same, but | Idempotency-Key required. One attendee (groups: 501); attendees_ids also takes a provider_id, username or link. One text message per message request until it's accepted. quote_id, linkedin, subject, video_message: 400. |
GET /chats/{chat_id}/attendees |
Same | |
GET /chats/{chat_id}/sync |
Same, but | Reads the chat from Instagram at once and answers when done (status: "SYNC_DONE", or "CHAT_DELETED" for a chat Instagram no longer has). |
GET /messages |
Same, but | account_id required. The newest chats' messages: opens a chat only when the inbox can't answer (marks_seen). |
GET /messages/{message_id} |
Same, but | account_id required. Found among its chat's newest 300 messages, else 404. |
GET /messages/{message_id}/attachments/{attachment_id} |
Same | The file, read in the account's own session. |
POST /messages/{message_id}/reaction |
Same | One reaction per person: a new one replaces the last. |
DELETE /messages/{message_id}/reaction |
Same | Unipile names no providers for this route; Lempile serves it for Instagram. |
GET /chat_attendees |
Same | |
GET /chat_attendees/{attendee_id} |
Same | |
GET /chat_attendees/{attendee_id}/picture |
Same | |
GET /chat_attendees/{attendee_id}/chats |
Same | The account's one-to-one chat with that person. |
GET /chat_attendees/{sender_id}/messages |
Same | |
GET /chat_attendees/{attendee_id}/sync |
501 | Use GET /chats/{chat_id}/sync. |
DELETE /chats/{chat_id}, PATCH /chats/{chat_id} |
501 | Unipile doesn't do them for Instagram either (WhatsApp, LinkedIn and Telegram only). |
DELETE /messages/{message_id}, PATCH /messages/{message_id}, POST /messages/{message_id}/forward |
501 | Unipile doesn't do them for Instagram either. |
Users#
| Unipile route | Lempile | Notes |
|---|---|---|
GET /users/{identifier} |
Same | Each read opens the profile in the account's browser. |
GET /users/me |
Same, but | Unipile publishes no Instagram shape for it: Lempile answers the UserProfile fields with object: "AccountOwnerProfile". |
PATCH /users/me/edit |
Same, but | summary (the bio, 150 at most) and picture. LinkedIn's fields answer 400. |
GET /users/followers |
Same | 25 a page at most (a limit from 26 to 250 gets 25; more answers 400). |
GET /users/following |
Same, but | Items are UserFollower, as followers'. Unipile documents LinkedIn's relation shape for this route. 25 a page by default, 100 at most (a limit from 101 to 1,000 gets 100; more answers 400). |
POST /users/invite |
Same, but | Follows. Idempotency-Key required. invitation_id is the person's provider_id. A private account gets a follow request. |
DELETE /users/invite/sent/{invitation_id} |
Same, but | Unfollows, or takes back a follow request. Idempotency-Key required. |
GET /users/invite/received |
Same, but | The account's follow requests. Unipile publishes only LinkedIn's item shape; an item's id is the person's provider_id. |
POST /users/invite/received/{invitation_id} |
Same | accept or decline. |
GET /users/{identifier}/posts |
Same | |
GET /users/{identifier}/comments, GET /users/{identifier}/reactions |
501 | Instagram's web doesn't list them. |
GET /users/invite/sent, GET /users/relations |
501 | Unipile doesn't do them for Instagram either. |
Posts#
| Unipile route | Lempile | Notes |
|---|---|---|
GET /posts/{post_id} |
Same | provider_id, shortcode, or the post or reel link. |
GET /posts/{post_id}/comments |
Same, but | In the order the post's page shows them: sort_by=MOST_RELEVANT is 501. Replies with comment_id. |
POST /posts/{post_id}/comments |
Same, but | Idempotency-Key required. Replies with comment_id. |
GET /posts/{post_id}/reactions |
Same, but | Unipile publishes only LinkedIn's shape: each like is a PostReaction with value: "LIKE", author.type: "INDIVIDUAL" and an empty headline. |
POST /posts/reaction |
Same | like only, on a post or a comment. |
POST /posts |
Same, but | Idempotency-Key required. Feed posts, 1 to 10 pictures or videos. A story (post_type: "story") or a video_thumbnail: 501, Instagram's web can't make them. |
GET /posts/drafts/{draft_id} |
501 | LinkedIn only on Unipile. |
Webhooks#
| Unipile route or event | Lempile | Notes |
|---|---|---|
POST /webhooks |
Same, but | Sources messaging and account_status. A messaging webhook takes events (default message_received, as Unipile), account_ids (Lempile ids, 50 at most), format, data and enabled. The answer adds secret, which signs every call (X-Lempile-Signature). |
GET /webhooks |
Same, but | Header values masked. |
DELETE /webhooks/{webhook_id} |
Same | |
messaging events |
Same, but | message_received, message_read, message_reaction, about 10 minutes after the fact, not between 23:00 and 07:00 in the account's time zone. Retried 30 s, 2 min, 10 min, 30 min and 2 h later. message_edited, message_deleted, message_delivered: accepted, never sent. |
account_status events |
Same, but | CREATION_SUCCESS, RECONNECTED, OK, CONNECTING, CREDENTIALS (signed out, a security check, or suspended), DELETED. Never ERROR, CREATION_FAIL, STOPPED, PERMISSIONS, SYNC_SUCCESS. Lempile adds status, previous_status and reason around Unipile's AccountStatus. Seen when Lempile next opens the account (a call, or the inbox read about every 10 minutes, not at night). |
users events (new_relation) |
Never sent | Unipile doesn't send them for Instagram either. |
Lempile's Own#
"dry_run": true on every write |
Everything up to the last step, nothing sent: 200 with not_sent: true. A message's dry run never types. When the write is already so (already liked, already following), the answer says so in checks. |
Idempotency-Key on every write |
Required on messages, new chats, comments, posts, follows and unfollows; made by Lempile (and answered in the same header) for the other writes when none is sent. A retry never writes twice; replays say Idempotent-Replayed: true. |
GET /writes/{key} |
What became of a write. See Errors And Limits. |
marks_seen |
true on an answer that opened a conversation. |
retry_at, code on a 429 |
When to try again, and which limit. |
Was this page helpful?