Can I use shared drafts with the API?

Is this feature accessible via the API?
I tried creating a new topic in the category I selected for Shared Drafts, but it created a regular posting, not a shared draft.
Does the API support shared drafts?

Anything that can be done via the UX can be done via the API. That said, I don’t believe we have this documented. You’ll need to follow this guide to figure out how to make the correct API calls.

This is expected, the shared drafts category is still a normal category, normal topics can be created there. You need to change the type of content you’re creating - a shared draft, not a new topic.

8 إعجابات

Understood. I will follow the guide to figure out the magic incantation and share my results. To be continued …

إعجاب واحد (1)

لإنشاء مسودة مشتركة، تحتاج إلى إجراء طلب POST إلى /posts.json مع حمولة مثل:

{
    "raw": "محتوى المسودة المشتركة",
    "title": "عنوان المسودة المشتركة",
    "category": 31,
    "archetype": "regular",
    "shared_draft": true,
    "draft_key": "new_topic"
}

يجب إدراج الفئة في إعداد الموقع فئة المسودات المشتركة.

إعجابَين (2)