تسجيل الدخول

OAuth 2.1 لمساعدي الذكاء الاصطناعي

عملاء عامّون مع PKCE (S256)، وتسجيل ديناميكي (RFC 7591) أو Client ID Metadata Document، والموارد وفق RFC 8707، وiss وفق RFC 9207. رموز الوصول صالحة ساعة واحدة، ورموز التحديث 30 يوماً وتُجدَّد عند كل استخدام.

https://app.postflug.de/.well-known/oauth-protected-resource/mcp
https://app.postflug.de/.well-known/oauth-authorization-server
https://app.postflug.de/oauth/register
https://app.postflug.de/oauth/authorize
https://app.postflug.de/oauth/token
https://app.postflug.de/oauth/revoke

مفاتيح API لبرامجك الخاصة

أرسله في الترويسة بصيغة Authorization: Bearer pfk_…. استخدمه من الخادم فقط، ولا تستخدمه في المتصفح أبداً. لا يقبل Postflug الرموز في شريط العنوان.

تنشئ المفتاح في التطبيق باسم وصلاحيات. يُعرض مرة واحدة فقط، ولا نحفظ لدينا إلا قيمة التجزئة. حتى عشرة مفاتيح نشطة لكل شخص، ويمكن حذف كل منها على حدة.

طلبات REST

curl https://app.postflug.de/api/v1/approvals \
  -H "Authorization: Bearer pfk_…"

curl -X POST https://app.postflug.de/api/v1/drafts \
  -H "Authorization: Bearer pfk_…" -H "Content-Type: application/json" \
  -d '{"text":"…","scheduled_at":"2026-12-04T18:00:00+01:00","channels":["instagram"]}'

يمكن استدعاء كل أداة مباشرة أيضاً:

curl -X POST https://app.postflug.de/api/v1/tools/get_schedule \
  -H "Authorization: Bearer pfk_…" -H "Content-Type: application/json" \
  -d '{"from":"2026-12-01","to":"2026-12-07"}'

تأتي الردود بصيغة JSON: ‏200 مع ok وdata، وإلا 4xx مع error (رمز ثابت) وhint (جملة واحدة بالإنجليزية). عند 429 تذكر ترويسة Retry-After مدة الانتظار.

الصلاحيات

readالقراءة · عرض المنشورات والجدول والقنوات والأرقام ومكتبة الوسائط وبيانات المنشأة.
write_postsمسودات المنشورات · إنشاء المسودات وتعديلها وطلب التغييرات وإضافة الملفات. كل شيء ينتظر موافقتك.
publishالموافقة · الموافقة على المنشورات المنتظرة. الجدولة المباشرة فقط إذا سمحت بها لهذا الاتصال.
engageالرد · الرد على التعليقات والرسائل المباشرة ومراجعات Google وإدارتها.
settingsالإعدادات · تغيير ساعات العمل ورابط السيرة والردود التلقائية على الرسائل.

«القراءة» جزء من كل اتصال. يستطيع أعضاء الفريق السماح بالقراءة والمسودات فقط، وتبقى الموافقة والرد والإعدادات للمالكين والمسؤولين.

الحدود

60 طلباً في الدقيقة و1,000 في الساعة لكل اتصال، منها 20 طلبات تعديل في الدقيقة. حدود الباقة والموافقة والفحص تسري كما في التطبيق.

الأدوات

37 أداة كما يعرّفها التطبيق. العناوين والأوصاف بالإنجليزية كما يراها المساعد. مخططات المدخلات متاحة عبر tools/list (MCP) وGET /api/v1/tools.

الموافقات

  • list_pending_approvals

    List posts waiting for approval

    Lists the business's posts that wait for the owner's approval or have a change request: caption, channels, planned slot, the files with their public URLs, and an approval_token for approve_post.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/approvals POST /api/v1/tools/list_pending_approvals

  • approve_post

    Approve a waiting post

    Approves one waiting post exactly as it was listed (approval_token from list_pending_approvals), so it goes out at its planned time on its channels. Refused when the post changed since, a file is held for checking, a video was not watched in the app, or a channel requirement is missing.

    الصلاحية: publish (الموافقة)يعدّلللمالك/المسؤول فقطلا يمكن التراجع عنهيؤثر في المنصات

    RESTPOST /api/v1/posts/{post_id}/approve POST /api/v1/tools/approve_post

  • request_changes

    Ask for changes to a waiting post

    Records the owner's change wish for a waiting post (e.g. "shorter, no emojis"). Postflug rewrites the caption from the wish; the new version waits for approval again.

    الصلاحية: write_posts (مسودات المنشورات)يعدّلللمالك/المسؤول فقط

    RESTPOST /api/v1/posts/{post_id}/request-changes POST /api/v1/tools/request_changes

  • reject_post

    Reject a waiting post

    Rejects a waiting post: it will not be published. Same as "Nicht posten" in the app.

    الصلاحية: write_posts (مسودات المنشورات)يعدّلللمالك/المسؤول فقطلا يمكن التراجع عنه

    RESTPOST /api/v1/posts/{post_id}/reject POST /api/v1/tools/reject_post

المنشورات والجدول

  • get_schedule

    Show the posting schedule

    The business's planned, waiting and published posts between two days (business time zone, at most 62 days).

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/schedule POST /api/v1/tools/get_schedule

  • list_posts

    List posts

    Lists the business's posts, newest first, filtered by status, channel and a day range (business time zone).

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/posts POST /api/v1/tools/list_posts

  • list_channels

    List connected channels

    The business's social channels (Instagram, Facebook, Google Business, TikTok, LinkedIn, YouTube, X) with their status and whether they can post right now.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/channels POST /api/v1/tools/list_channels

  • create_draft

    Create a post draft

    Creates a post from a caption (and optionally one image from a public web address). It never goes out on its own: without scheduled_at it is a draft in the app; with scheduled_at it waits for the owner's approval for that slot.

    الصلاحية: write_posts (مسودات المنشورات)يعدّليؤثر في المنصات

    RESTPOST /api/v1/drafts POST /api/v1/tools/create_draft

  • schedule_post

    Schedule a post

    Plans a post for a time on chosen connected channels (all connected channels if none named), with media and per-channel options (own caption, first comment, reel or story, location, trial reel). It waits for the owner's approval unless the owner allowed direct publishing for this connection.

    الصلاحية: write_posts (مسودات المنشورات)يعدّليؤثر في المنصات

    RESTPOST /api/v1/posts POST /api/v1/tools/schedule_post

  • update_post

    Edit a post

    Changes a post's caption, title, time, channels or files. Fields left out stay as they are. An edited post waits for the owner's approval again unless direct publishing is allowed for this connection; posts already out can't be edited.

    الصلاحية: write_posts (مسودات المنشورات)يعدّل

    RESTPATCH /api/v1/posts/{post_id} POST /api/v1/tools/update_post

  • reschedule_post

    Move a post to another time

    Moves a planned post to a new time; its content stays. Moving a post that is already approved needs the publish permission and an owner or admin.

    الصلاحية: write_posts (مسودات المنشورات)يعدّل

    RESTPOST /api/v1/posts/{post_id}/reschedule POST /api/v1/tools/reschedule_post

  • duplicate_post

    Duplicate a post

    Copies a post as a new draft, optionally for another time and other channels. The copy needs the owner's approval like any new post.

    الصلاحية: write_posts (مسودات المنشورات)يعدّل

    RESTPOST /api/v1/posts/{post_id}/duplicate POST /api/v1/tools/duplicate_post

  • delete_post

    Delete a post

    Deletes a post that is not out yet (a planned post is withdrawn from the channels first). Published posts stay on the platforms.

    الصلاحية: write_posts (مسودات المنشورات)يعدّللا يمكن التراجع عنه

    RESTDELETE /api/v1/posts/{post_id} POST /api/v1/tools/delete_post

التعليقات والرسائل والمراجعات

  • list_comments

    List comments

    Comments on the business's posts collected in the Postfach (Instagram, Facebook, …): author, text, the post, status and the reply if any.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/comments POST /api/v1/tools/list_comments

  • reply_comment

    Reply to a comment

    Posts a public reply to a comment on the platform, in the business's name.

    الصلاحية: engage (الرد)يعدّليؤثر في المنصات

    RESTPOST /api/v1/comments/{comment_id}/reply POST /api/v1/tools/reply_comment

  • hide_comment

    Hide a comment

    Hides a comment from everyone but its author (Instagram, Facebook). Can be undone with unhide_comment.

    الصلاحية: engage (الرد)يعدّليؤثر في المنصات

    RESTPOST /api/v1/comments/{comment_id}/hide POST /api/v1/tools/hide_comment

  • unhide_comment

    Show a hidden comment again

    Makes a comment hidden with hide_comment visible again.

    الصلاحية: engage (الرد)يعدّليؤثر في المنصات

    RESTPOST /api/v1/comments/{comment_id}/unhide POST /api/v1/tools/unhide_comment

  • delete_comment

    Delete a comment

    Deletes a comment on the platform for good.

    الصلاحية: engage (الرد)يعدّلللمالك/المسؤول فقطلا يمكن التراجع عنهيؤثر في المنصات

    RESTDELETE /api/v1/comments/{comment_id} POST /api/v1/tools/delete_comment

  • list_messages

    List direct messages

    The business's Instagram and Facebook direct-message conversations, newest first; with conversation_id also the messages of that conversation.

    الصلاحية: engage (الرد)يقرأيؤثر في المنصات

    RESTGET /api/v1/messages POST /api/v1/tools/list_messages

  • reply_message

    Reply to a direct message

    Sends a reply in an Instagram or Facebook conversation, in the business's name. Only within 24 hours of the customer's last message (Meta's rule).

    الصلاحية: engage (الرد)يعدّليؤثر في المنصات

    RESTPOST /api/v1/messages/{conversation_id}/reply POST /api/v1/tools/reply_message

  • list_reviews

    List Google reviews

    The business's Google reviews: rating, author, text, status and the reply if any.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/reviews POST /api/v1/tools/list_reviews

  • reply_review

    Reply to a Google review

    Publishes the business's public reply to a Google review (replaces an earlier reply).

    الصلاحية: engage (الرد)يعدّليؤثر في المنصات

    RESTPOST /api/v1/reviews/{review_id}/reply POST /api/v1/tools/reply_review

الأرقام

  • get_stats

    Show reach and engagement

    Reach, impressions, interactions, followers and the top posts for the last 7, 30 or 90 days – the numbers the app's Analyse page shows (updated daily).

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/stats POST /api/v1/tools/get_stats

  • get_post_stats

    Show a post's numbers

    Reach, views, likes, comments, shares, saves and clicks of one published post, as last read from the platforms (updated daily).

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/posts/{post_id}/stats POST /api/v1/tools/get_post_stats

  • best_times

    Best posting times

    The business's best local posting times and weekdays, from its own results, similar businesses or its trade, with per-channel times where there is enough data.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/best-times POST /api/v1/tools/best_times

مكتبة الوسائط

  • list_media

    List the media library

    Pictures and videos in the business's media library, newest first, with their public URLs and ids for posts.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/media POST /api/v1/tools/list_media

  • get_media

    Show one file

    One picture or video of the media library: URL, size, alt text and how often it was used.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/media/{media_id} POST /api/v1/tools/get_media

  • upload_media

    Add an image from a web address

    Copies one image (JPEG, PNG, WebP, GIF, up to 15 MB) from a public web address into the business's media library and returns its id for posts.

    الصلاحية: write_posts (مسودات المنشورات)يعدّليؤثر في المنصات

    RESTPOST /api/v1/media POST /api/v1/tools/upload_media

المنشأة والإعدادات

  • get_business_profile

    Show the business profile

    The business's name, trade, address, website, opening hours, languages, time zone, approval rhythm and connected channels.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/business POST /api/v1/tools/get_business_profile

  • get_brand_kit

    Show the brand kit

    The business's brand: colours, fonts, logos, voice (tone, address, emoji use), taglines and photo style.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/brand-kit POST /api/v1/tools/get_brand_kit

  • update_opening_hours

    Change the opening hours text

    Changes the opening hours Postflug uses in posts, the link-in-bio page and automatic DM replies (free text like "Di–So 11:30–22:00"). Google's regular hours are not changed here.

    الصلاحية: settings (الإعدادات)يعدّلللمالك/المسؤول فقط

    RESTPATCH /api/v1/opening-hours POST /api/v1/tools/update_opening_hours

  • add_special_hours

    Set holiday or special hours on Google

    Writes special opening hours (holidays, closures, changed times) for given days to every connected Google Business location. Existing special hours of other days stay.

    الصلاحية: settings (الإعدادات)يعدّلللمالك/المسؤول فقطيؤثر في المنصات

    RESTPOST /api/v1/special-hours POST /api/v1/tools/add_special_hours

  • get_dm_auto_reply

    Show the automatic DM replies

    Whether Postflug answers Instagram/Facebook direct messages on its own (after hours, Ice Breaker questions), with the questions and texts in use.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/dm-auto-reply POST /api/v1/tools/get_dm_auto_reply

  • set_dm_auto_reply

    Change the automatic DM replies

    Switches the automatic Instagram/Facebook DM replies on or off and sets which parts run (after-hours reply, Ice Breaker questions). The Ice Breakers are written to the platforms at once.

    الصلاحية: settings (الإعدادات)يعدّلللمالك/المسؤول فقطيؤثر في المنصات

    RESTPATCH /api/v1/dm-auto-reply POST /api/v1/tools/set_dm_auto_reply

أفكار ونصوص

  • generate_post_ideas

    Post ideas for the business

    Post ideas from the business's trade and its own topics, in the language of its posts, without the ones the owner kept turning down.

    الصلاحية: read (القراءة)يقرأ

    RESTGET /api/v1/ideas POST /api/v1/tools/generate_post_ideas

  • generate_caption

    Write a caption

    Writes a post caption in the business's voice and post language from a topic or note (optionally for a picture from the media library). Uses one text request of the plan's monthly allowance; nothing is saved.

    الصلاحية: write_posts (مسودات المنشورات)يعدّل

    RESTPOST /api/v1/captions POST /api/v1/tools/generate_caption

مولّد من سجل أدوات التطبيق، بتاريخ 14 نوفمبر 2026.