> ## Documentation Index
> Fetch the complete documentation index at: https://docs.posttu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a mass message

> Send a message to multiple channels at once.



## OpenAPI

````yaml openapi.json POST /api/v1/inbox/send-mass-message
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/inbox/send-mass-message:
    post:
      tags:
        - Inbox
      summary: Send a mass message
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMassMessage'
      responses:
        '200':
          description: Mass message result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboxSendMassMessageResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SendMassMessage:
      type: object
      properties:
        selectedChannels:
          type: array
          items:
            type: object
            properties:
              platform:
                type: string
                enum:
                  - ONLYFANS
                  - FANSLY
                  - FANVUE
                  - MASTODON
                  - BLUESKY
                  - TWITTER
                description: Social media platform that supports mass messaging
                example: TWITTER
              channelId:
                type: string
                description: Channel ID
                example: ch_abc123
            required:
              - platform
              - channelId
          description: Channels to send to
          example:
            - platform: ONLYFANS
              channelId: ch_abc123
        messageData:
          $ref: '#/components/schemas/CreateMassMessage'
      required:
        - selectedChannels
        - messageData
    InboxSendMassMessageResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Success status
        error:
          type: string
          description: Error message
        data:
          type:
            - object
            - 'null'
          properties:
            sentCount:
              type: number
              description: Number of messages sent
              example: 50
            failedCount:
              type: number
              description: Number of failed sends
            results:
              type: array
              items:
                type: object
                properties:
                  channelId:
                    type: string
                  success:
                    type: boolean
                  messageId:
                    type:
                      - string
                      - 'null'
                  error:
                    type:
                      - string
                      - 'null'
                required:
                  - channelId
                  - success
                  - messageId
                  - error
              description: Per-channel results
          required:
            - sentCount
      required:
        - success
        - data
    CreateMassMessage:
      type: object
      properties:
        message:
          type: string
          description: Message content
          example: Hello!
        scheduledFor:
          type: string
          format: date-time
        media:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  id:
                    type: string
                    description: Media ID from the source
                  source:
                    type: string
                    enum:
                      - ONLYFANS
                      - FANSLY
                      - FANVUE
                      - POSTTU
                    default: POSTTU
                    description: Source of the media.
                  previewId:
                    type:
                      - string
                      - 'null'
                    description: Preview ID
                  coverId:
                    type:
                      - string
                      - 'null'
                    description: Cover ID
                  sourceChannelId:
                    type: string
                    description: >-
                      Source channel ID required when source is not posttu
                      upload or id
                  isPreview:
                    type:
                      - boolean
                      - 'null'
                    description: Is preview image
                  isCover:
                    type:
                      - boolean
                      - 'null'
                    description: Is cover image
                required:
                  - id
              order:
                type: number
                description: Order of the media in the message
                example: 1
            required:
              - item
          description: >-
            Array of media that will be used in this request including preview
            and cover images if any. If the platform is fansly, you must also
            pass media in the fansly.media field if you want to add custom
            permissions or bundle media together, otherwise the default
            permissions will be applied to the media items and will treat this
            as a single bundle of media.
        mediaPreviewIds:
          type: array
          items:
            type: string
          description: >-
            Array of media preview IDs for fanvue and onlyfans. To be shown for
            free as a preview of a pay-to-view. Fanvue supports only 1 preview,
            Onlyfans supports multiple previews. Fansly ignores this field use
            fansly.media in channelFilters per fansly account to set preview
            images for fansly
        onlyfans:
          type: object
          properties:
            lockedText:
              type: boolean
              default: false
            onlineOnly:
              type: boolean
              default: false
        price:
          type: number
          description: Message price for onlyfans and fanvue
          example: 5
        fansly:
          type: object
          properties:
            lockedText:
              type: array
              items:
                type: object
                properties:
                  text:
                    type: string
                  permissions:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            flags:
                              type: number
                            verificationFlags:
                              type:
                                - number
                                - 'null'
                            metadata:
                              type:
                                - string
                                - 'null'
                            validAfter:
                              type:
                                - number
                                - 'null'
                            validBefore:
                              type:
                                - number
                                - 'null'
                            price:
                              type: number
                              default: 0
                            type:
                              type: number
                              default: 0
                          required:
                            - flags
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                price:
                                  type: number
                                  minimum: 5
                                  default: 5
                                  description: >-
                                    The price to purchase the locked text.
                                    Default value is 5.
                                tipped:
                                  type: number
                                  minimum: 0.5
                                  default: 0.5
                                  description: >-
                                    Limit to users who tipped at least this
                                    amount. Default value is 0.5.
                                following:
                                  type: boolean
                                  description: >-
                                    Grant access to users who are following the
                                    account.
                                subscribed:
                                  type: boolean
                                  description: >-
                                    Grant access to users who are subscribed to
                                    the account. cannot be used with
                                    subscription
                            - type: object
                              additionalProperties:
                                type: object
                                properties:
                                  price:
                                    type: number
                                    minimum: 5
                                    default: 5
                                    description: >-
                                      The price to purchase the locked text.
                                      Default value is 5.
                                  tipped:
                                    type: number
                                    minimum: 0.5
                                    default: 0.5
                                    description: >-
                                      Limit to users who tipped at least this
                                      amount. Default value is 0.5.
                                  following:
                                    type: boolean
                                    description: >-
                                      Grant access to users who are following
                                      the account.
                                  subscribed:
                                    type: boolean
                                    description: >-
                                      Grant access to users who are subscribed
                                      to the account. cannot be used with
                                      subscription
                required:
                  - text
              description: >-
                Fansly locked texts. Global for all fansly accounts in this mass
                message
        fanvue:
          type: object
          properties:
            includedSmartListIds:
              type: array
              items:
                type: string
                enum:
                  - subscribers
                  - auto_renewing
                  - non_renewing
                  - followers
                  - free_trial_subscribers
                  - expired_subscribers
                  - spent_more_than_50
                  - muted
                  - creators
              description: >-
                Fixed smart-list identifier strings. Global for all fanvue
                accounts in this mass message
            excludedSmartListIds:
              type: array
              items:
                type: string
                enum:
                  - subscribers
                  - auto_renewing
                  - non_renewing
                  - followers
                  - free_trial_subscribers
                  - expired_subscribers
                  - spent_more_than_50
                  - muted
                  - creators
              description: >-
                Fixed smart-list identifier strings. Global for all fanvue
                accounts in this mass message
        channelFilters:
          type: array
          items:
            type: object
            properties:
              platform:
                type: string
                enum:
                  - ONLYFANS
                  - FANSLY
                  - FANVUE
                  - MASTODON
                  - BLUESKY
                  - TWITTER
                description: Social media platform that supports mass messaging
                example: TWITTER
              channelId:
                type: string
              tags:
                type: array
                items:
                  type: string
                description: >-
                  Target custom tag IDs (onlyfans, fansly, fanvue, mastodon,
                  bluesky, twitter)
              list:
                type: array
                items:
                  type: string
                description: Target lists (onlyfans, fansly, fanvue)
              excludeList:
                type: array
                items:
                  type: string
                description: Excluded lists (onlyfans, fansly, fanvue)
              users:
                type: array
                items:
                  type: string
                description: Target users (onlyfans and fansly)
              excludeUsers:
                type: array
                items:
                  type: string
                description: Excluded users (onlyfans and fansly)
              fansly:
                type: object
                properties:
                  media:
                    type: array
                    items:
                      type: object
                      properties:
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              source:
                                type: string
                                enum:
                                  - POSTTU
                                  - FANSLY
                                  - ONLYFANS
                                  - FANVUE
                              previewId:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Preview id of the media, leave blank if not
                                  applicable
                              coverId:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Cover id of the media for videos, leave blank
                                  if not applicable
                              sourceChannelId:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Source channel id of the media, leave blank if
                                  source is posttu
                              isPreview:
                                type:
                                  - boolean
                                  - 'null'
                                description: Is preview image
                              isCover:
                                type:
                                  - boolean
                                  - 'null'
                                description: Is cover image
                            required:
                              - id
                              - source
                            description: Array of media
                        order:
                          type: number
                          description: >-
                            Order of the media bundle in the message. The API
                            requires a value; it is filled from the array index
                            when omitted.
                          example: 1
                        permissions:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  flags:
                                    type: number
                                  verificationFlags:
                                    type:
                                      - number
                                      - 'null'
                                  metadata:
                                    type:
                                      - string
                                      - 'null'
                                  validAfter:
                                    type:
                                      - number
                                      - 'null'
                                  validBefore:
                                    type:
                                      - number
                                      - 'null'
                                  price:
                                    type: number
                                    default: 0
                                  type:
                                    type: number
                                    default: 0
                                required:
                                  - flags
                            - type: array
                              items:
                                anyOf:
                                  - type: object
                                    properties:
                                      price:
                                        type: number
                                        minimum: 5
                                        default: 5
                                        description: >-
                                          The price to purchase the locked text.
                                          Default value is 5.
                                      validAfter:
                                        type:
                                          - number
                                          - 'null'
                                        default: null
                                        description: >-
                                          Avaliable after this date (unix
                                          timestamp in seconds). Default value is
                                          null.
                                      validBefore:
                                        type:
                                          - number
                                          - 'null'
                                        default: null
                                        description: >-
                                          Avaliable until this date (unix
                                          timestamp in seconds). Default value is
                                          null.
                                      list:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            description: The id of the list.
                                          label:
                                            type: string
                                            description: The name of the list.
                                        required:
                                          - id
                                          - label
                                      subscription:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            default: ''
                                            description: >-
                                              The id of the subscription level. leave
                                              blank if you want to match any
                                              subscription level defaults to empty
                                              string
                                          name:
                                            type: string
                                            default: ''
                                            description: >-
                                              The name of the subscription level.
                                              leave blank if you want to match any
                                              subscription name defaults to empty
                                              string
                                          before:
                                            type: number
                                            default: 0
                                            description: >-
                                              Limit to users who had an active
                                              subscription before this date. e.g.
                                              1672531200 (unix timestamp in seconds)
                                          after:
                                            type: number
                                            default: 0
                                            description: >-
                                              Limit to users who had an active
                                              subscription after this date. e.g.
                                              1672531200 (unix timestamp in seconds)
                                      following:
                                        type: boolean
                                        description: >-
                                          Grant access to users who are following
                                          the account.
                                      subscribed:
                                        type: boolean
                                        description: >-
                                          Grant access to users who are subscribed
                                          to the account. cannot be used with
                                          subscription
                                    description: >-
                                      Used to build media permission for fansly.
                                      Can't have both 'subscribed' and
                                      'subscription' in the same object.
                                  - type: object
                                    additionalProperties:
                                      type: object
                                      properties:
                                        price:
                                          type: number
                                          minimum: 5
                                          default: 5
                                          description: >-
                                            The price to purchase the locked text.
                                            Default value is 5.
                                        validAfter:
                                          type:
                                            - number
                                            - 'null'
                                          default: null
                                          description: >-
                                            Avaliable after this date (unix
                                            timestamp in seconds). Default value is
                                            null.
                                        validBefore:
                                          type:
                                            - number
                                            - 'null'
                                          default: null
                                          description: >-
                                            Avaliable until this date (unix
                                            timestamp in seconds). Default value is
                                            null.
                                        list:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              description: The id of the list.
                                            label:
                                              type: string
                                              description: The name of the list.
                                          required:
                                            - id
                                            - label
                                        subscription:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              default: ''
                                              description: >-
                                                The id of the subscription level. leave
                                                blank if you want to match any
                                                subscription level defaults to empty
                                                string
                                            name:
                                              type: string
                                              default: ''
                                              description: >-
                                                The name of the subscription level.
                                                leave blank if you want to match any
                                                subscription name defaults to empty
                                                string
                                            before:
                                              type: number
                                              default: 0
                                              description: >-
                                                Limit to users who had an active
                                                subscription before this date. e.g.
                                                1672531200 (unix timestamp in seconds)
                                            after:
                                              type: number
                                              default: 0
                                              description: >-
                                                Limit to users who had an active
                                                subscription after this date. e.g.
                                                1672531200 (unix timestamp in seconds)
                                        following:
                                          type: boolean
                                          description: >-
                                            Grant access to users who are following
                                            the account.
                                        subscribed:
                                          type: boolean
                                          description: >-
                                            Grant access to users who are subscribed
                                            to the account. cannot be used with
                                            subscription
                                      description: >-
                                        Used to build media permission for
                                        fansly. Can't have both 'subscribed' and
                                        'subscription' in the same object.
                      required:
                        - items
                    description: >-
                      Array of media for fansly. Media placed in items will be
                      bundled together.
                  includeSubscribers:
                    type: object
                    properties:
                      autoRenewOn:
                        type: boolean
                        default: true
                      autoRenewOff:
                        type: boolean
                        default: true
                      tiers:
                        anyOf:
                          - type: string
                            enum:
                              - all
                          - type: array
                            items:
                              type: string
                        default: all
                    description: Include subscribers
                  includeExpiredSubscribers:
                    type: boolean
                    default: false
                    description: Include expired subscribers
                  includeFollowers:
                    type: boolean
                    default: false
                    description: Include followers
                  excludeCreators:
                    type: boolean
                    default: true
                    description: Exclude creators
                  excludeOfflineUsers:
                    type: boolean
                    default: false
                    description: >-
                      Exclude offline users. This will not send your message to
                      users that are not currently online on Fansly, even if
                      they otherwise would meet your criteria. To send a message
                      to all your receipients, uncheck this option!
              conversationIds:
                type: array
                items:
                  type: string
                description: Target conversation IDs (mastodon, blusky, twitter)
              excludeConversationIds:
                type: array
                items:
                  type: string
                description: Excluded conversation IDs (mastodon, blusky, twitter)
              selectAll:
                type: boolean
                description: >-
                  Whether all conversations/users are selected (mastodon,
                  blusky, twitter). Must have recived a message from the user
                  while channel was connected to posttu at least once.
            required:
              - platform
              - channelId
          description: >-
            Fine tune the recipients of the mass message to exclude or include
            certain users/conversations/groups
      description: Message payload
      example:
        text: Hello!
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.