# Typefully

> Write, plan and schedule posts and threads for X, LinkedIn, Threads, Bluesky, Mastodon and Substack with Typefully: create, edit and delete drafts, upload media, tag drafts, read the queue and set posting times, and comment on drafts.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/typefully

## Actions

### Create draft

Write a post or thread for X, LinkedIn, Threads, Bluesky, Mastodon or Substack, and save it as a draft, plan it, schedule it or publish it now. Publishing counts towards your plan's monthly posts.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Text (`text`, text, required): What to post. For a thread, put a line holding only --- between posts. LinkedIn and Substack take a single post.
- Platforms (`platforms`, list): Where to post. Leave empty to post to every account connected to it in Typefully. One or more of: `x`, `linkedin`, `mastodon`, `threads`, `bluesky`, `substack`.
- When (`when`, text): What happens once it is saved. A planned draft sits on your calendar and waits for you to schedule it. One of: `draft` (Save as a draft (default)), `plan_next_free_slot` (Plan for the next free slot (won't publish by itself)), `plan_at` (Plan for a set time (won't publish by itself)), `next_free_slot` (Schedule for the next free slot), `at` (Schedule for a set time), `now` (Publish now). Default: `draft`.
- Date and time (`publish_time`, date and time): When to publish or plan it. It must be in the future. Only when When is Schedule for a set time or Plan for a set time (won't publish by itself).
- Title (`draft_title`, text): A title for the draft, seen only in Typefully. Up to 512 characters.
- Tags (`tags`, list): Tags for the draft. Each must already exist in the account: make one with 'Create tag'.
- Media IDs (`media_ids`, list): Media ids from 'Upload media', attached to the first post, up to 20. On an update they replace the first post's media.
- Share link (`share`, true/false): Turn on to make a public link anyone can use to read the draft.
- Notes (`scratchpad_text`, text): Notes kept beside the draft in Typefully. They are never posted.
- Post to quote (`quote_post_url`, text): Link to a post to quote in the first post. It is quoted on the network the link is from: X, Bluesky, Threads, Substack, or Mastodon for any other server.
- X post to reply to (`x_reply_to_url`, text): Link to an X post. The first post goes out as a reply to it.
- X community (`x_community_id`, text): Post into this X community: its id, or its link (x.com/i/communities/...). You must be allowed to post there.
- Who can reply on X (`x_reply_settings`, text): Leave empty to let everyone reply. One of: `following` (Accounts you follow), `mentionedUsers` (Only accounts you mention), `subscribers` (Your subscribers), `verified` (Verified accounts).
- LinkedIn first comment (`linkedin_first_comment`, text): Posted as a comment under the LinkedIn post once it is published. Up to 1250 characters.
- LinkedIn post to reshare (`linkedin_reshare_target`, text): Link to a LinkedIn post, or its urn:li:share: id, to reshare with your text.
- Link preview (`link_preview`, text): Whether a link in the post shows a preview card on LinkedIn, Threads and Substack. Leave empty for Typefully's usual (shown). One of: `show` (Show the preview card), `hide` (Hide it (links stay plain text)).

**Outputs**

- `draft` (object): The draft

**Example output**

```json
{
  "draft": {
    "bluesky_post_published_at": null,
    "bluesky_published_url": null,
    "created_at": "2026-10-20T09:00:00Z",
    "draft_id": 7654321,
    "draft_title": "Launch post",
    "id": 7654321,
    "linkedin_post_published_at": null,
    "linkedin_published_url": null,
    "mastodon_post_published_at": null,
    "mastodon_published_url": null,
    "platforms": {
      "bluesky": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "quote_post_url": null,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {}
      },
      "linkedin": null,
      "mastodon": null,
      "substack": null,
      "threads": null,
      "x": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "made_with_ai": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "paid_partnership": false,
            "quote_post_url": null,
            "reply_settings": null,
            "subscribers_only": false,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {
          "community_id": null,
          "reply_to_url": null,
          "share_with_followers": null
        }
      },
      "x_article": null
    },
    "preview": "Launching our new feature today",
    "private_url": "https://typefully.com/?a=12345&d=7654321",
    "publish_state": null,
    "published_at": null,
    "scheduled_date": null,
    "scratchpad_text": "Check the link before scheduling.",
    "share_url": null,
    "social_set_id": 12345,
    "status": "draft",
    "substack_post_published_at": null,
    "substack_published_url": null,
    "tags": [
      "launch"
    ],
    "threads_post_published_at": null,
    "threads_published_url": null,
    "updated_at": "2026-10-20T09:30:00Z",
    "x_article_published_at": null,
    "x_article_published_url": null,
    "x_post_published_at": null,
    "x_published_url": null
  }
}
```

### Create tag

Create a tag in an account, for sorting drafts. Typefully makes its slug from the name.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Name (`name`, text, required): The tag's name, up to 32 characters. It must be new.

**Outputs**

- `tag` (object): The tag

**Example output**

```json
{
  "tag": {
    "created_at": "2026-10-01T09:00:00Z",
    "name": "Launch",
    "slug": "launch"
  }
}
```

### Delete comment thread

Delete a comment thread and every comment in it.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Comment thread ID (`comment_thread_id`, text, required): The thread's id, from 'List comment threads' or 'Start comment thread'.

**Outputs**

- `comment_thread_id` (text): The thread deleted
- `deleted` (true/false): Always true once deleted
- `draft_id` (number): The draft it was on

**Example output**

```json
{
  "comment_thread_id": "4f2d1c3b-8a7e-4b6f-9c5d-2e1a0b9c8d7e",
  "deleted": true,
  "draft_id": 7654321
}
```

### Delete draft

Delete a draft, whatever its status. A scheduled draft is taken out of the queue.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `draft_id` (number): The draft deleted
- `social_set_id` (number): The account it was in

**Example output**

```json
{
  "deleted": true,
  "draft_id": 7654321,
  "social_set_id": 12345
}
```

### Get account

Get one Typefully account (social set): the X, LinkedIn, Threads, Bluesky, Mastodon and Substack accounts connected to it, and how many posts its plan has left this month.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.

**Outputs**

- `connected_platforms` (list): The platforms with an account connected, which drafts can post to
- `social_set` (object): The account (social set)

**Example output**

```json
{
  "connected_platforms": [
    "x",
    "bluesky"
  ],
  "social_set": {
    "id": 12345,
    "name": "Jo Bloggs",
    "platforms": {
      "bluesky": {
        "name": "Jo Bloggs",
        "platform": "bluesky",
        "profile_image_url": "https://pbs.example.com/jo.png",
        "profile_url": "https://bsky.app/profile/jobloggs",
        "username": "jobloggs.bsky.social"
      },
      "linkedin": null,
      "mastodon": null,
      "substack": null,
      "threads": null,
      "x": {
        "name": "Jo Bloggs",
        "platform": "x",
        "profile_image_url": "https://pbs.example.com/jo.png",
        "profile_url": "https://x.com/jobloggs",
        "username": "jobloggs"
      }
    },
    "profile_image_url": "https://pbs.example.com/jo.png",
    "publishing_quota": {
      "remaining": 7,
      "resets_at": "2026-11-01T00:00:00Z",
      "used": 3
    },
    "team": null,
    "username": "jobloggs"
  }
}
```

### Get current user

Get the Typefully user the API key belongs to: name, email, sign-up date and the key's name.

**Inputs**: None.

**Outputs**

- `user` (object): The Typefully user the API key belongs to

**Example output**

```json
{
  "user": {
    "api_key_label": "Lodol",
    "email": "jo@example.com",
    "id": 101,
    "name": "Jo Bloggs",
    "profile_image_url": "https://pbs.example.com/jo.png",
    "signup_date": "2025-03-01T10:00:00Z"
  }
}
```

### Get draft

Get one draft with its posts for each platform, its status and date, and the links to it once published. After 'Publish now', read it until 'publish_state' is finished.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Hide comment markers (`exclude_comment_markers`, true/false): Turn on to get the text without the markers comment threads leave in it. Leave off to edit the text and send it back.

**Outputs**

- `draft` (object): The draft

**Example output**

```json
{
  "draft": {
    "bluesky_post_published_at": null,
    "bluesky_published_url": null,
    "created_at": "2026-10-20T09:00:00Z",
    "draft_id": 7654321,
    "draft_title": "Launch post",
    "id": 7654321,
    "linkedin_post_published_at": null,
    "linkedin_published_url": null,
    "mastodon_post_published_at": null,
    "mastodon_published_url": null,
    "platforms": {
      "bluesky": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "quote_post_url": null,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {}
      },
      "linkedin": null,
      "mastodon": null,
      "substack": null,
      "threads": null,
      "x": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "made_with_ai": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "paid_partnership": false,
            "quote_post_url": null,
            "reply_settings": null,
            "subscribers_only": false,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {
          "community_id": null,
          "reply_to_url": null,
          "share_with_followers": null
        }
      },
      "x_article": null
    },
    "preview": "Launching our new feature today",
    "private_url": "https://typefully.com/?a=12345&d=7654321",
    "publish_state": null,
    "published_at": null,
    "scheduled_date": null,
    "scratchpad_text": "Check the link before scheduling.",
    "share_url": null,
    "social_set_id": 12345,
    "status": "draft",
    "substack_post_published_at": null,
    "substack_published_url": null,
    "tags": [
      "launch"
    ],
    "threads_post_published_at": null,
    "threads_published_url": null,
    "updated_at": "2026-10-20T09:30:00Z",
    "x_article_published_at": null,
    "x_article_published_url": null,
    "x_post_published_at": null,
    "x_published_url": null
  }
}
```

### Get media

Check an uploaded file: whether it is still processing, ready or failed, and its links once ready.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Media ID (`media_id`, text, required): The media id 'Upload media' returned.

**Outputs**

- `media` (object): The uploaded file

**Example output**

```json
{
  "media": {
    "alt_text": "The new dashboard",
    "error_reason": null,
    "file_name": "launch.png",
    "media_id": "550e8400-e29b-41d4-a716-446655440000",
    "media_urls": {
      "large": "https://media.example.com/launch-3200.png",
      "medium": "https://media.example.com/launch-1200.png",
      "original": "https://media.example.com/launch.png",
      "small": "https://media.example.com/launch-600.png"
    },
    "mime": "image/png",
    "status": "ready"
  }
}
```

### Get queue

Get an account's posting slots between two dates, with the draft in each and the free ones listed.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- From (`start_date`, date): The first day to show. Defaults to today.
- To (`end_date`, date): The last day to show, at most 62 days after the first. Defaults to a week from the first.

**Outputs**

- `free_slots` (list): The slots with no draft in them, soonest first
- `queue` (object): The queue between the two dates

**Example output**

```json
{
  "free_slots": [
    "2026-10-21T08:00:00Z"
  ],
  "queue": {
    "days": [
      {
        "date": "2026-10-21",
        "items": [
          {
            "at": "2026-10-21T08:00:00Z",
            "draft": null,
            "kind": "queue_slot"
          },
          {
            "at": "2026-10-21T16:30:00Z",
            "draft": {
              "bluesky_post_enabled": true,
              "bluesky_post_published_at": null,
              "bluesky_published_url": null,
              "created_at": "2026-10-20T09:00:00Z",
              "draft_title": "Launch post",
              "id": 7654321,
              "linkedin_post_enabled": false,
              "linkedin_post_published_at": null,
              "linkedin_published_url": null,
              "mastodon_post_enabled": false,
              "mastodon_post_published_at": null,
              "mastodon_published_url": null,
              "preview": "Launching our new feature today",
              "private_url": "https://typefully.com/?a=12345&d=7654321",
              "published_at": null,
              "scheduled_date": "2026-10-21T16:30:00Z",
              "share_url": null,
              "social_set_id": 12345,
              "status": "scheduled",
              "substack_post_enabled": false,
              "substack_post_published_at": null,
              "substack_published_url": null,
              "tags": [
                "launch"
              ],
              "threads_post_enabled": false,
              "threads_post_published_at": null,
              "threads_published_url": null,
              "updated_at": "2026-10-20T09:30:00Z",
              "x_post_enabled": true,
              "x_post_published_at": null,
              "x_published_url": null
            },
            "kind": "queue_slot"
          }
        ]
      }
    ],
    "end_date": "2026-10-27",
    "social_set_id": 12345,
    "start_date": "2026-10-21"
  }
}
```

### Get queue schedule

Get the weekly posting times an account's queue fills, in its time zone.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.

**Outputs**

- `schedule` (object): The posting schedule

**Example output**

```json
{
  "schedule": {
    "rules": [
      {
        "days": [
          "mon",
          "tue",
          "wed",
          "thu",
          "fri"
        ],
        "h": 9,
        "m": 0
      },
      {
        "days": [
          "mon",
          "wed",
          "fri"
        ],
        "h": 17,
        "m": 30
      }
    ],
    "social_set_id": 12345,
    "timezone": "Europe/London"
  }
}
```

### List accounts

List the Typefully accounts (social sets) you can use, your own and your teams'. Every other step works in one of them.

**Inputs**

- Page size (`limit`, number): How many to return, 1 to 50. Typefully's default is 10. From 1 to 50.
- Skip (`offset`, number): How many to skip. For the next page, pass the 'next_offset' of the page before. At least 0.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_offset` (number): The offset that reads the next page, or null on the last one
- `social_sets` (list): The accounts
- `total_count` (number): How many match, across every page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "social_sets": [
    {
      "id": 12345,
      "name": "Jo Bloggs",
      "profile_image_url": "https://pbs.example.com/jo.png",
      "team": null,
      "username": "jobloggs"
    }
  ],
  "total_count": 1
}
```

### List comment threads

List the comment threads on a draft, with their comments. Open ones unless you ask for resolved or all.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Platform (`platform`, text): Only threads on this platform's posts. One of: `x`, `linkedin`, `mastodon`, `threads`, `bluesky`, `substack`.
- Status (`status`, text): Which threads to list. Defaults to open ones. One of: `unresolved` (Open (default)), `resolved`, `all`.
- Page size (`limit`, number): How many to return, 1 to 50. Typefully's default is 10. From 1 to 50.
- Skip (`offset`, number): How many to skip. For the next page, pass the 'next_offset' of the page before. At least 0.

**Outputs**

- `comment_threads` (list): The comment threads
- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_offset` (number): The offset that reads the next page, or null on the last one
- `total_count` (number): How many match, across every page

**Example output**

```json
{
  "comment_threads": [
    {
      "comments": [
        {
          "created_at": "2026-10-20T10:00:00Z",
          "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
          "text": "Can we name the feature here?",
          "user": {
            "id": 101,
            "name": "Jo Bloggs",
            "profile_image_url": null
          }
        }
      ],
      "draft_id": 7654321,
      "id": "4f2d1c3b-8a7e-4b6f-9c5d-2e1a0b9c8d7e",
      "platform": "x",
      "selected_text": "new feature",
      "status": "unresolved"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "total_count": 1
}
```

### List drafts

List an account's drafts, filtered by status (draft, planned, scheduled, published, failed) and tags. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Status (`status`, text): Only drafts with this status. Leave empty for every status. One of: `draft` (Draft (no date)), `planned` (Planned (dated, won't publish by itself)), `scheduled`, `publishing` (Publishing now), `published`, `error` (Failed to publish).
- Tags (`tags`, list): Only drafts with these tags.
- Order (`order_by`, text): How to sort them. Defaults to the most recently edited first. One of: `-updated_at` (Last edited, newest first (default)), `updated_at` (Last edited, oldest first), `-created_at` (Created, newest first), `created_at` (Created, oldest first), `scheduled_date` (Scheduled date, soonest first), `-scheduled_date` (Scheduled date, latest first), `-published_at` (Published, newest first), `published_at` (Published, oldest first).
- Page size (`limit`, number): How many to return, 1 to 50. Typefully's default is 10. From 1 to 50.
- Skip (`offset`, number): How many to skip. For the next page, pass the 'next_offset' of the page before. At least 0.

**Outputs**

- `count` (number): How many are on this page
- `drafts` (list): The drafts
- `has_more` (true/false): Whether another page follows
- `next_offset` (number): The offset that reads the next page, or null on the last one
- `total_count` (number): How many match, across every page

**Example output**

```json
{
  "count": 1,
  "drafts": [
    {
      "bluesky_post_enabled": true,
      "bluesky_post_published_at": null,
      "bluesky_published_url": null,
      "created_at": "2026-10-20T09:00:00Z",
      "draft_title": "Launch post",
      "id": 7654321,
      "linkedin_post_enabled": false,
      "linkedin_post_published_at": null,
      "linkedin_published_url": null,
      "mastodon_post_enabled": false,
      "mastodon_post_published_at": null,
      "mastodon_published_url": null,
      "preview": "Launching our new feature today",
      "private_url": "https://typefully.com/?a=12345&d=7654321",
      "published_at": null,
      "scheduled_date": null,
      "share_url": null,
      "social_set_id": 12345,
      "status": "draft",
      "substack_post_enabled": false,
      "substack_post_published_at": null,
      "substack_published_url": null,
      "tags": [
        "launch"
      ],
      "threads_post_enabled": false,
      "threads_post_published_at": null,
      "threads_published_url": null,
      "updated_at": "2026-10-20T09:30:00Z",
      "x_post_enabled": true,
      "x_post_published_at": null,
      "x_published_url": null
    }
  ],
  "has_more": false,
  "next_offset": null,
  "total_count": 1
}
```

### List tags

List an account's tags, by slug.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Page size (`limit`, number): How many to return, 1 to 50. Typefully's default is 10. From 1 to 50.
- Skip (`offset`, number): How many to skip. For the next page, pass the 'next_offset' of the page before. At least 0.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_offset` (number): The offset that reads the next page, or null on the last one
- `tags` (list): The tags
- `total_count` (number): How many match, across every page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "tags": [
    {
      "created_at": "2026-10-01T09:00:00Z",
      "name": "Launch",
      "slug": "launch"
    }
  ],
  "total_count": 1
}
```

### Reply to comment thread

Add a comment to a thread on a draft.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Comment thread ID (`comment_thread_id`, text, required): The thread's id, from 'List comment threads' or 'Start comment thread'.
- Comment (`text`, text, required): What to say. Up to 10000 characters.

**Outputs**

- `comment_thread` (object): The comment thread

**Example output**

```json
{
  "comment_thread": {
    "comments": [
      {
        "created_at": "2026-10-20T10:00:00Z",
        "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "text": "Can we name the feature here?",
        "user": {
          "id": 101,
          "name": "Jo Bloggs",
          "profile_image_url": null
        }
      }
    ],
    "draft_id": 7654321,
    "id": "4f2d1c3b-8a7e-4b6f-9c5d-2e1a0b9c8d7e",
    "platform": "x",
    "selected_text": "new feature",
    "status": "unresolved"
  }
}
```

### Resolve comment thread

Mark a comment thread resolved. Its comments are kept, and its marker comes out of the draft's text.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Comment thread ID (`comment_thread_id`, text, required): The thread's id, from 'List comment threads' or 'Start comment thread'.

**Outputs**

- `comment_thread` (object): The comment thread

**Example output**

```json
{
  "comment_thread": {
    "comments": [
      {
        "created_at": "2026-10-20T10:00:00Z",
        "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "text": "Can we name the feature here?",
        "user": {
          "id": 101,
          "name": "Jo Bloggs",
          "profile_image_url": null
        }
      }
    ],
    "draft_id": 7654321,
    "id": "4f2d1c3b-8a7e-4b6f-9c5d-2e1a0b9c8d7e",
    "platform": "x",
    "selected_text": "new feature",
    "status": "resolved"
  }
}
```

### Start comment thread

Comment on some words in a draft's post, starting a thread others can reply to.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- Text to comment on (`selected_text`, text, required): The words in the post the comment is about, exactly as they appear in it.
- Comment (`text`, text, required): What to say. Up to 10000 characters.
- Platform (`platform`, text): Which platform's posts. Needed when the draft posts to more than one. One of: `x`, `linkedin`, `mastodon`, `threads`, `bluesky`, `substack`.
- Post number (`post_number`, number): Which post of the thread the text is in: 1 for the first (the usual). From 1 to 50.
- Which match (`occurrence`, number): When the text appears more than once in the post, which one: 1 for the first (the usual). At least 1.

**Outputs**

- `comment_thread` (object): The comment thread

**Example output**

```json
{
  "comment_thread": {
    "comments": [
      {
        "created_at": "2026-10-20T10:00:00Z",
        "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "text": "Can we name the feature here?",
        "user": {
          "id": 101,
          "name": "Jo Bloggs",
          "profile_image_url": null
        }
      }
    ],
    "draft_id": 7654321,
    "id": "4f2d1c3b-8a7e-4b6f-9c5d-2e1a0b9c8d7e",
    "platform": "x",
    "selected_text": "new feature",
    "status": "unresolved"
  }
}
```

### Update draft

Change a draft's text, platforms, title, tags, notes or post options, or plan, schedule, unschedule or publish it. Anything left empty stays as it is. A published draft cannot be changed.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Draft ID (`draft_id`, text, required): The draft's id, from 'List drafts' or an earlier step. The draft's address copied from Typefully works too.
- New text (`text`, text): New text for every platform the draft posts to, with a line holding only --- between thread posts. Each post keeps its media and options. Leave empty to keep the text.
- Platforms (`platforms`, list): Where the draft posts from now on; any it posted to that are not chosen are turned off. Adding a platform needs the new text too. Leave empty to keep its platforms. One or more of: `x`, `linkedin`, `mastodon`, `threads`, `bluesky`, `substack`.
- When (`when`, text): Whether to change when it goes out. Unschedule takes the date off and makes it a plain draft again. One of: `keep` (Leave as it is (default)), `clear` (Unschedule (back to a plain draft)), `plan_next_free_slot` (Plan for the next free slot (won't publish by itself)), `plan_at` (Plan for a set time (won't publish by itself)), `next_free_slot` (Schedule for the next free slot), `at` (Schedule for a set time), `now` (Publish now). Default: `keep`.
- Date and time (`publish_time`, date and time): When to publish or plan it. It must be in the future. Only when When is Schedule for a set time or Plan for a set time (won't publish by itself).
- Title (`draft_title`, text): A title for the draft, seen only in Typefully. Up to 512 characters.
- Tags (`tags`, list): Tags to replace the draft's own with. Leave empty to keep its tags.
- Media IDs (`media_ids`, list): Media ids from 'Upload media', attached to the first post, up to 20. On an update they replace the first post's media.
- Share link (`share`, text): Turn the draft's public share link on or off. Leave empty to keep it. One of: `on` (Turn the share link on), `off` (Turn the share link off).
- Notes (`scratchpad_text`, text): Notes kept beside the draft in Typefully. They are never posted.
- Post to quote (`quote_post_url`, text): Link to a post to quote in the first post. It is quoted on the network the link is from: X, Bluesky, Threads, Substack, or Mastodon for any other server.
- X post to reply to (`x_reply_to_url`, text): Link to an X post. The first post goes out as a reply to it.
- X community (`x_community_id`, text): Post into this X community: its id, or its link (x.com/i/communities/...). You must be allowed to post there.
- Who can reply on X (`x_reply_settings`, text): Leave empty to let everyone reply. One of: `following` (Accounts you follow), `mentionedUsers` (Only accounts you mention), `subscribers` (Your subscribers), `verified` (Verified accounts).
- LinkedIn first comment (`linkedin_first_comment`, text): Posted as a comment under the LinkedIn post once it is published. Up to 1250 characters.
- LinkedIn post to reshare (`linkedin_reshare_target`, text): Link to a LinkedIn post, or its urn:li:share: id, to reshare with your text.
- Link preview (`link_preview`, text): Whether a link in the post shows a preview card on LinkedIn, Threads and Substack. Leave empty for Typefully's usual (shown). One of: `show` (Show the preview card), `hide` (Hide it (links stay plain text)).
- Overwrite comments (`force_overwrite_comments`, true/false): Turn on to replace text that has comment threads on it. Those threads are resolved.

**Outputs**

- `draft` (object): The draft

**Example output**

```json
{
  "draft": {
    "bluesky_post_published_at": null,
    "bluesky_published_url": null,
    "created_at": "2026-10-20T09:00:00Z",
    "draft_id": 7654321,
    "draft_title": "Launch post",
    "id": 7654321,
    "linkedin_post_published_at": null,
    "linkedin_published_url": null,
    "mastodon_post_published_at": null,
    "mastodon_published_url": null,
    "platforms": {
      "bluesky": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "quote_post_url": null,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {}
      },
      "linkedin": null,
      "mastodon": null,
      "substack": null,
      "threads": null,
      "x": {
        "enabled": true,
        "posts": [
          {
            "hide_link_preview": false,
            "made_with_ai": false,
            "media_ids": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "paid_partnership": false,
            "quote_post_url": null,
            "reply_settings": null,
            "subscribers_only": false,
            "text": "Launching our new feature today"
          }
        ],
        "settings": {
          "community_id": null,
          "reply_to_url": null,
          "share_with_followers": null
        }
      },
      "x_article": null
    },
    "preview": "Launching our new feature today",
    "private_url": "https://typefully.com/?a=12345&d=7654321",
    "publish_state": null,
    "published_at": null,
    "scheduled_date": null,
    "scratchpad_text": "Check the link before scheduling.",
    "share_url": null,
    "social_set_id": 12345,
    "status": "planned",
    "substack_post_published_at": null,
    "substack_published_url": null,
    "tags": [
      "launch"
    ],
    "threads_post_published_at": null,
    "threads_published_url": null,
    "updated_at": "2026-10-20T09:30:00Z",
    "x_article_published_at": null,
    "x_article_published_url": null,
    "x_post_published_at": null,
    "x_published_url": null
  }
}
```

### Update queue schedule

Replace an account's weekly posting times. The whole schedule is replaced, and it needs Admin access to the account.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- Posting times (`times`, text): The times of day to post at, in the account's time zone, separated by commas. They replace the whole schedule.
- Days (`days`, list): The days to post on at those times. Leave empty for every day. One or more of: `mon` (Monday), `tue` (Tuesday), `wed` (Wednesday), `thu` (Thursday), `fri` (Friday), `sat` (Saturday), `sun` (Sunday).
- Rules (`rules`, list): Instead of times and days: the schedule's rules as 'Get queue schedule' returns them, such as [{"h": 9, "m": 0, "days": ["mon"]}].

**Outputs**

- `schedule` (object): The posting schedule

**Example output**

```json
{
  "schedule": {
    "rules": [
      {
        "days": [
          "mon",
          "tue",
          "wed",
          "thu",
          "fri"
        ],
        "h": 9,
        "m": 0
      },
      {
        "days": [
          "mon",
          "wed",
          "fri"
        ],
        "h": 17,
        "m": 30
      }
    ],
    "social_set_id": 12345,
    "timezone": "Europe/London"
  }
}
```

### Upload media

Upload an image, GIF, video or PDF to attach to drafts, and wait up to a minute for Typefully to process it. Pass its 'media_id' to 'Create draft'.

**Inputs**

- Account (`social_set_id`, text, required): The Typefully account (social set) to work in. Pick one, or give its id from an earlier step.
- File (`file`, text, required): Upload a file, pick one from an earlier step, or paste a public https link to one. JPG, PNG, WEBP, GIF, MP4, MOV or PDF.
- File name (`file_name`, text): The name to give it, such as launch.png. Defaults to the file's own name; anything other than letters, digits, - _ . ( ) is replaced.
- Alt text (`alt_text`, text): A description of the image for people using screen readers. Up to 1000 characters.

**Outputs**

- `media` (object): The uploaded file

**Example output**

```json
{
  "media": {
    "alt_text": "The new dashboard",
    "error_reason": null,
    "file_name": "launch.png",
    "media_id": "550e8400-e29b-41d4-a716-446655440000",
    "media_urls": {
      "large": "https://media.example.com/launch-3200.png",
      "medium": "https://media.example.com/launch-1200.png",
      "original": "https://media.example.com/launch.png",
      "small": "https://media.example.com/launch-600.png"
    },
    "mime": "image/png",
    "status": "ready"
  }
}
```
