网淘吧来吧,欢迎您!

Mixpost技能使用说明

2026-03-29 新闻来源:网淘吧 围观:20
电脑广告
手机广告

Mixpost 技能

Mixpost 是一款自托管的社交媒体管理软件,可帮助您跨多个平台(包括 Facebook、Twitter/X、Instagram、LinkedIn、Pinterest、TikTok、YouTube、Mastodon、Google Business Profile、Threads、Bluesky 等)安排和管理社交媒体内容。

设置

  1. 导航至您的 Mixpost 仪表板
  2. 点击访问令牌从用户菜单中
  3. 点击创建以生成新令牌
  4. 获取您的工作区 UUID:前往社交媒体账户页面,点击任意账户的三点菜单,并复制工作区 UUID
  5. 设置环境变量:
    export MIXPOST_URL="https://your-mixpost-instance.com/mixpost"
    export MIXPOST_ACCESS_TOKEN="your-access-token"
    export MIXPOST_WORKSPACE_UUID="your-workspace-uuid"
    

测试连接

curl -X GET "$MIXPOST_URL/api/ping" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

账户

获取所有账户

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/accounts" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

获取特定账户

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/accounts/:accountUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

媒体

获取所有媒体文件

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/media?limit=50" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

获取特定媒体文件

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/media/:mediaUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

上传媒体文件(表单数据)

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/media" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -F "file=@/path/to/your/file.png"

更新媒体文件

curl -X PUT "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/media/:mediaUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "alt_text": "Alternative text for accessibility"
  }'

删除媒体文件

curl -X DELETE "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/media" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "items": ["media-id-1", "media-id-2"]
  }'

标签

获取所有标签

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/tags" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

获取特定标签

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/tags/:tagUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

创建标签

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/tags" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Marketing",
    "hex_color": "#FF5733"
  }'

更新标签

curl -X PUT "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/tags/:tagUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Updated Tag Name",
    "hex_color": "#00FF00"
  }'

删除标签

curl -X DELETE "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/tags/:tagUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

文章

获取所有文章

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts?limit=50&status=scheduled&page=1" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

查询参数:

  • limit(数字,默认值:50):每页结果数
  • status草稿已排期已发布失败,需要审核,垃圾
  • 关键词(字符串):按内容搜索帖子
  • 账户(数组):按账户ID筛选
  • 标签(数组):按标签名称筛选
  • 页码(数字):用于分页的页码

获取特定帖子

curl -X GET "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

创建帖子

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "schedule": true,
    "date": "2024-12-25",
    "time": "10:00",
    "timezone": "America/New_York",
    "accounts": [1, 2],
    "tags": [1],
    "versions": [
      {
        "account_id": 0,
        "is_original": true,
        "content": [
          {
            "body": "Hello from Mixpost API!",
            "media": [1, 2],
            "url": "https://example.com"
          }
        ],
        "options": {}
      }
    ]
  }'

帖子选项:

  • 定时:设置为true以安排在特定日期/时间发布
  • 立即发布:设置为true以立即发布
  • 队列:设置为true添加到发布队列
  • 如果未设置,文章将保存为草稿

平台特定选项:

{
  "options": {
    "facebook_page": {
      "type": "post" // post, reel, story
    },
    "instagram": {
      "type": "post" // post, reel, story
    },
    "linkedin": {
      "visibility": "PUBLIC" // PUBLIC, CONNECTIONS
    },
    "mastodon": {
      "sensitive": false // boolean
    },
    "pinterest": {
      "link": null, // null | string
      "title": "", // string
      "boards": {
        "account-1": "971672010430333260" // The key `account-*` is the ID of your Pinterest account
      }
    },
    "youtube": {
      "title": null, // null | string
      "status": "public" // public, private, unlisted
    },
    "gbp": { // Google Business Profile
      "type": "post", // post, offer, event
      "button": "NONE", // NONE, BOOK, ORDER, SHOP, LEARN_MORE, SIGN_UP, CALL
      "button_link": "", // Leave empty if button is NONE or CALL
      "offer_has_details": false, // Only applies if type is offer
      "coupon_code": "", // Only applies if type is offer and offer_has_details is true
      "offer_link": "", // Only applies if type is offer and offer_has_details is true
      "terms": "", // Only applies if type is offer and offer_has_details is true
      "event_title": "", // Only applies if type is event or offer
      "start_date": null, // null | string - Only applies if type is event or offer
      "end_date": null, // null | string - Only applies if type is event or offer
      "event_has_time": false, // Only applies if type is event
      "start_time": "09:00", // Only applies if type is event and event_has_time is true
      "end_time": "17:00" // Only applies if type is event and event_has_time is true
    },
    "tiktok": {
      "privacy_level": {
        "account-2": "PUBLIC_TO_EVERYONE" // PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY - The key `account-*` is the ID of your TikTok account
      },
      "allow_comments": {
        "account-2": true // boolean
      },
      "allow_duet": {
        "account-2": false // boolean
      },
      "allow_stitch": {
        "account-2": false // boolean
      },
      "content_disclosure": {
        "account-2": false // boolean
      },
      "brand_organic_toggle": {
        "account-2": false // boolean
      },
      "brand_content_toggle": {
        "account-2": false // boolean
      }
    }
  }
}

更新文章

curl -X PUT "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "content": "Updated post content",
    "schedule_at": "2024-12-25T10:00:00Z",
    "media": ["url1", "url2"],
    "tags": ["tag1", "tag2"],
    "account_ids": ["id1", "id2"]
  }'

删除文章

curl -X DELETE "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "trash": false,
    "delete_mode": "app_only"
  }'

删除模式:

  • 仅应用内:仅从应用程序中删除(默认)
  • 应用和社交媒体:从应用程序和社交媒体平台同时删除
  • 仅社交媒体:仅从社交媒体平台删除

删除多篇文章

curl -X DELETE "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "posts": ["post-uuid-1", "post-uuid-2"],
    "trash": false,
    "delete_mode": "app_only"
  }'

安排文章发布时间

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/schedule/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "postNow": false
  }'

将文章添加到队列

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/add-to-queue/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"

批准文章

curl -X POST "$MIXPOST_URL/api/$MIXPOST_WORKSPACE_UUID/posts/approve/:postUuid" \
  -H "Authorization: Bearer $MIXPOST_ACCESS_TOKEN" \
  -H "Accept: application/json"
免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第326334名访客 今日有221篇新文章/评论