Spredfast Messages API

The Messages API from Spredfast — 6 operation(s) for messages.

Operations 8

POST /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message Publish a new message. #
GET /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId} Retrieve an existing message. #
PUT /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId} Update an existing multi-part message. #
DELETE /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId} Delete an existing message. #
POST /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?multipart Publish a new message. #
POST /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?imageset Publish a new message. #
POST /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?video Publish a new message. #
PUT /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId}?multipart Update an existing multi-part message. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spredfast-messages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spredfast-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: "Welcome to the Spredfast Conversations API. Using this API you can access many of the features of the Spredfast platform including publishing and reporting.\n# Prerequisites\nIn order to make an API call to the platform, you must have the following:\n- Enable the DevCenter application for your company. See [troubleshooting](#devcenter-not-enabled) for more information.\n- A valid login for the platform (used to retrieve an access token, described below)\n- An assigned client id for your application\n- That client id enabled for your company in conversations\nIf you are reading this documentation you already have your login! Let's proceed the the next two steps.\n\n# Authentication and Authorization\n\nSpredfast uses the OAuth standard for API authorization. OAuth specifies the manner in which a bearer token may be obtained that will authorize your API calls. OAuth tokens are managed from the same authentication system as your web logins. All company security policies including SAML SSO integration are supported and enforced.\n\n## Client Id\n\nA client id uniquely identifies your application. There is a whitelist in place to control which applications have access to your company in Conversations. This allows you to control when an application is activated for your company.\n\nTo retrieve your client id, please have your company admin contact [support@spredfast.com](mailto:support@spredfast.com) and request a new or pre-existing client id. Please provide a description of your application. You may also request this application be enabled for your company, if you are the company administrator.\n\nSupport will respond with a client id and a client secret, both of which are needed to obtain an access token.\n\n## Browser Redirection Flow\n\nIf you are building a web application where your users will interact with a UI to authenticate against Spredfast, you are advised to implement the OAuth browser redirection flow. There are many resources available on the web on how to implement this flow, but the basic process is shown below:\n\n\nYou will redirect the user to login.spredfast.com with the following URL:\n\n [https://login.spredfast.com/v3/oauth/authorize?client id=YOUR CLIENT ID&response type=code&redirect uri=https://YOUR URL&state=none](https://login.spredfast.com/v3/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=https://YOUR_URL&state=none)\n\n Replace YOUR CLIENT ID with the id of your API client and YOUR URL with the URL of your web application the user should return two once an OAuth Grant has been obtained.\n\nWhen the user returns to your website there will be a URL parameter called "code" set. This is an authorization code that you must use to obtain an access token. Make a POST call to the following endpoint to obtain your access token:\n\n```bash \ncurl https://login.spredfast.com/v3/oauth/token \\\n\t-H \"Accept: application/json\" \\\n\t--data 'client_id=YOUR_CLIENT_ID' \\\n\t--data 'client_secret=YOUR_CLIENT_SECRET' \\\n\t--data 'redirect_uri=https://YOUR_URL' \\\n\t--data 'code=CODE_RETURNED'\n```\n\nOnce again substitute YOUR_CLIENT_ID for your client id. You must also provide your client secret in YOUR_CLIENT_SECRET and the code you received in CODE_RETURNED.\n\nYou will receive a JSON response that contains your access token in a response like this:\n\n```js\n{\n   \"data\":{\n      \"sfEntityType\":\"Token\",\n      \"accessToken\":\"XXX\",\n      \"expiryTime\":1519770939876\n   },\n   \"status\":{\n      \"succeeded\":true\n   }\n}\n```\n\nTokens are issued with a 2 year lifetime. Save this token in a secure place. It’s a bearer token and is all that is needed to make API calls on your behalf.\n\n## DevCenter Test Request Flow\nBefore you can query any endpoint, you must first obtain a token. Do this by clicking the \"Get Access Token\" button on any endpoint. You will then be redirected to login via Spredfast and authenticate the DevCenter app for your company. Once complete you will return to the DevCenter and will notice that the `oauth_access_token` variable is filled in. You may now run any Spredfast API action against your company.\n\n### Developer notes\nWhile developing against the Spredfast API you will be using your own Spredfast API App (client_id/secret pair). To be absolutely certain you know what data your application is receiving, you can substitute the default DevCenter `client_id` and `secret` pair with your own.\n\n## Access Token Expiration\nAccess tokens are valid for 24 months. You may refresh these tokens at any time by repeating the authorization flow.\n# API Path Construction\nConversations APIs have several required parameters for all API calls. All Conversations APIs have the following URL path scheme:\n[https://api.spredfast.com/v1/conversations/](/api/conversations/v1/conversations)\n# API Overview\nSpredfast Conversations offers APIs to manage content and plans, publish content, and retrieve analytics reports.\n## Publishing\nPublishing requires you to select an initiative and an account set. To retrieve the list of initiatives use the [/{environment}/v1/company/{companyId}/initiative](/api/conversations/v1/conversations/initiatives/listinitiatives) call. To list the accounts available with that initiative, use the [/{environment}/v1/company/{companyId}/initiative/{initiativeId}/accountset](/api/conversations/v1/conversations/accountset/accountset) call.\n\nOnce you have these parameters you may publish content. For status updates (text) and images you publish with a single call. For video publishing you must first upload the video into the Conversations Content Center.\n\nStatus updated may be published with the [/{environment}/v1/company/{companyId}/initiative/{initiativeId}/message](/api/conversations/v1/conversations/messages/publishmessage) call. You will send your content as a JSON POST. For example:\n\n```js\n{\n   \"sfEntityType\":\"Message\",\n   \"service\":\"FACEBOOK\",\n   \"content\":{\n      \"sfEntityType\":\"Status\",\n      \"text\":\"Status Update\"\n   },\n   \" targetAccountIds\":[\n      \"4\"\n   ]\n}\n```\n\n# Troubleshooting\n\n## DevCenter not enabled\n\nIf you get an error while granting a token which reads `Company 20,307,234 does not allow the application TVjzVmUSDZFVdSpUiKBsQYIAzTrvVcUb`, then please contact [support@spredfast.com](mailto:support@spredfast.com) to enable the DevCenter application for your company."
  version: '1'
  title: Conversations API V1 Messages API
  license:
    name: Spredfast API Terms of Use
    url: https://s3.amazonaws.com/apiexplorer.spredfast.com/APITermsonlineacceptance.html
servers:
- url: https://api.spredfast.com
tags:
- name: Messages
paths:
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message:
    post:
      tags:
      - Messages
      summary: Publish a new message.
      description: Publish a new *Spredfast* Messages for the target Initiative.
      operationId: publishMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Message'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId}:
    get:
      tags:
      - Messages
      summary: Retrieve an existing message.
      description: The Messages endpoint returns information about the *Spredfast* Messages for the target Initiative.
      operationId: getMessage
      parameters:
      - name: messageId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
    put:
      tags:
      - Messages
      summary: Update an existing multi-part message.
      description: This endpoint is used to update an existing multi-part *Spredfast* Message.
      operationId: editMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: messageId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Message'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
    delete:
      tags:
      - Messages
      summary: Delete an existing message.
      description: This endpoint is used to delete an existing *Spredfast* Message.
      operationId: deleteMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: messageId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptionalResponseLong'
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?multipart:
    post:
      tags:
      - Messages
      summary: Publish a new message.
      description: Publish a new *Spredfast* Messages for the target Initiative.
      operationId: publishMultiPartMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                message:
                  type: string
                  x-multipart:
                    schema:
                      $ref: '#/components/schemas/MessageMultiPart'
                image:
                  type: string
                  format: binary
              required:
              - message
              - image
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?imageset:
    post:
      tags:
      - Messages
      summary: Publish a new message.
      description: "Publish a new *Spredfast* Messages for the target Initiative. **Note:** For multiple images the cURL should looks like this (notice that content.images is an array and must contain the same number of elements as files being uploaded): \n \n ```curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --header 'Authorization: Bearer {your token}' -F 'message={\"sfEntityType\":\"Message\",\"service\":\"FACEBOOK\",\"content\":{\"sfEntityType\":\"ImageShareList\",\"images\":[{\"sfEntityType\":\"ImageShare\",\"caption\":\"image one\"},{\"sfEntityType\":\"ImageShare\",\"caption\":\"image two\"},{\"sfEntityType\":\"ImageShare\",\"caption\":\"image three\"}]},\"targetAccountIds\":[\"4\"]};type=application/json' -F 'image=@butterfly1.jpg' -F 'image=@butterfly2.jpg' -F 'image=@butterfly3.jpg' 'https://api.spredfast.com/{env}/v1/company/{companyId}/initiative/{initiativeId}/message' \n``` "
      operationId: publishImageSetMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                message:
                  type: string
                  x-multipart:
                    schema:
                      $ref: '#/components/schemas/MessageMultiPartImages'
                image:
                  type: string
                  format: binary
              required:
              - message
              - image
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message?video:
    post:
      tags:
      - Messages
      summary: Publish a new message.
      description: Publish a new *Spredfast* Messages for the target Initiative.
      operationId: publishMultiPartVideoMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                message:
                  type: string
                  x-multipart:
                    schema:
                      $ref: '#/components/schemas/MessageMultiPartVideo'
              required:
              - message
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /{environment}/v1/company/{companyId}/initiative/{initiativeId}/message/{messageId}?multipart:
    put:
      tags:
      - Messages
      summary: Update an existing multi-part message.
      description: This endpoint is used to update an existing multi-part *Spredfast* Message.
      operationId: editMultiPartMessage
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: initiativeId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: messageId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: environment
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                message:
                  type: string
                  x-multipart:
                    schema:
                      $ref: '#/components/schemas/Message'
                image:
                  type: string
                  format: binary
              required:
              - message
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
components:
  schemas:
    MessageMultiPartImages:
      type: object
      properties:
        sfEntityType:
          type: string
          example: ImageShare
        caption:
          type: string
        id:
          type: string
        content:
          $ref: '#/components/schemas/MessageContent'
        title:
          type: string
        labels:
          type: array
          items:
            type: string
        service:
          type: string
          enum:
          - FACEBOOK
          - GOOGLEPLUS
          - SINAWEIBO
          - LINKEDIN
          - PINTEREST
          - YOUTUBE
          - VK
        targetAccountIds:
          type: array
          items:
            type: string
        organicVisibility:
          type: string
          enum:
          - VISIBLE
          - INVISIBLE
          - VISIBLE_POST_PUBLISH
        status:
          type: string
          enum:
          - DRAFT
          - PENDING
          - AWAITING_APPROVAL
          - REJECTED
          - PUBLISHED
          - ERROR
          - DELETED
          - NATIVELY_SCHEDULED
        delegationStatus:
          type: string
          enum:
          - NOT_DELEGATED
          - SCHEDULED_FOR_DELEGATION
          - DELEGATION_FAILED
          - DELEGATED
        publicationResults:
          type: array
          items:
            $ref: '#/components/schemas/PublicationResult'
        scheduledPublishDate:
          type: string
          format: date-time
        callbacks:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uri
        targetingProfile:
          $ref: '#/components/schemas/TargetingProfile'
        assetIds:
          type: array
          items:
            type: string
        planId:
          type: string
        nativeScheduling:
          type: boolean
          default: false
        notes:
          type: array
          items:
            $ref: '#/components/schemas/MessageNote'
      example:
        sfEntityType: Message
        service: FACEBOOK
        content:
          sfEntityType: ImageShareList
          images:
          - sfEntityType: ImageShare
            caption: image one
        targetAccountIds:
        - '4'
    Message:
      type: object
      properties:
        sfEntityType:
          type: string
          description: Spredfast internal entity type
          enum:
          - Message
        id:
          type: string
        content:
          $ref: '#/components/schemas/MessageContent'
        title:
          type: string
        labels:
          type: array
          items:
            type: string
        service:
          type: string
          description: Social network to publish to.
          default: FACEBOOK
          enum:
          - FACEBOOK
          - GOOGLEPLUS
          - SINAWEIBO
          - LINKEDIN
          - MULTI_CHANNEL
          - PINTEREST
          - YOUTUBE
          - VK
        targetAccountIds:
          type: array
          items:
            type: string
        organicVisibility:
          type: string
          enum:
          - VISIBLE
          - INVISIBLE
          - VISIBLE_POST_PUBLISH
        status:
          type: string
          default: DRAFT
          enum:
          - DRAFT
          - PENDING
          - AWAITING_APPROVAL
          - REJECTED
          - PUBLISHED
          - ERROR
          - DELETED
          - NATIVELY_SCHEDULED
        delegationStatus:
          type: string
          enum:
          - NOT_DELEGATED
          - SCHEDULED_FOR_DELEGATION
          - DELEGATION_FAILED
          - DELEGATED
        publicationResults:
          type: array
          items:
            $ref: '#/components/schemas/PublicationResult'
        scheduledPublishDate:
          type: string
          format: date-time
        callbacks:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uri
        targetingProfile:
          $ref: '#/components/schemas/TargetingProfile'
        assetIds:
          type: array
          items:
            type: string
        planId:
          type: string
        nativeScheduling:
          type: boolean
          default: false
        sponsor:
          $ref: '#/components/schemas/MessageSponsor'
        publisherIds:
          type: array
          items:
            type: string
        notes:
          type: array
          items:
            $ref: '#/components/schemas/MessageNote'
      example:
        sfEntityType: Message
        service: FACEBOOK
        content:
          sfEntityType: Status
          text: Status Update
        targetAccountIds:
        - '4'
    ApiError:
      type: object
      properties:
        code:
          type: string
          readOnly: true
          enum:
          - PUBLISH_DATE_INVALID
          - CANNOT_CREATE_NEW_LABELS
          - IP_ADDRESS_REJECTED
          - MISSING_FIELD
          - NOT_ACCEPTABLE
          - NOT_FOUND
          - PUBLISH_POST_UPDATE_NOT_ALLOWED
          - PUBLISH_IMAGE_BAD_CONTENT_TYPE
          - PUBLISH_IMAGE_TOO_LARGE
          - PUBLISH_IMAGE_BAD_IMAGE
          - PUBLISH_INVALID_ACCOUNT_FOR_SERVICE
          - INVALID_MESSAGE_ID
          - NOT_IN_PRE_PUBLISH_STATE
          - NOT_ACCEPTABLE_CONTENT_TYPE
          - MESSAGE_HAS_A_LINK_PREVIEW
          - MESSAGE_HAS_TARGETING_PROFILE
          - MESSAGE_HAS_PROMOTION
          - MESSAGE_HAS_SCHEDULED_SERIES
          - MESSAGE_HAS_APPROVAL_TEAMS
          - EDIT_MESSAGE_SERVER_ERROR
          - UNAUTHENTICATED
          - UNAUTHORIZED
          - UNKNOWN_ERROR
          - RESOURCE_NOT_FOUND
          - VALIDATION_ERROR
          - VIDEO_SINGLE_ASSET_ALLOWED
          - VIDEO_INVALID_CATEGORY
          - SERVICE_INVALID_NAME
          - STREAM_ITEM_INVALID_TYPE
          - PROXY_UNROUTABLE_REQUEST
          - PROXY_SERVER_FAILURE
          - PROXY_ORIGIN_SERVER_FAILURE
          - ACCOUNT_LOCKED
          - PASSWORD_EXPIRED
        message:
          type: string
          readOnly: true
    MessageMultiPartVideo:
      type: object
      properties:
        sfEntityType:
          type: string
          example: Video
        caption:
          type: string
        id:
          type: string
        content:
          $ref: '#/components/schemas/MessageContent'
        title:
          type: string
        labels:
          type: array
          items:
            type: string
        service:
          type: string
          enum:
          - FACEBOOK
          - GOOGLEPLUS
          - SINAWEIBO
          - LINKEDIN
          - PINTEREST
          - YOUTUBE
          - VK
        targetAccountIds:
          type: array
          items:
            type: string
        organicVisibility:
          type: string
          enum:
          - VISIBLE
          - INVISIBLE
          - VISIBLE_POST_PUBLISH
        status:
          type: string
          enum:
          - DRAFT
          - PENDING
          - AWAITING_APPROVAL
          - REJECTED
          - PUBLISHED
          - ERROR
          - DELETED
          - NATIVELY_SCHEDULED
        delegationStatus:
          type: string
          enum:
          - NOT_DELEGATED
          - SCHEDULED_FOR_DELEGATION
          - DELEGATION_FAILED
          - DELEGATED
        publicationResults:
          type: array
          items:
            $ref: '#/components/schemas/PublicationResult'
        scheduledPublishDate:
          type: string
          format: date-time
        callbacks:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uri
        targetingProfile:
          $ref: '#/components/schemas/TargetingProfile'
        assetIds:
          type: array
          items:
            type: string
        planId:
          type: string
        nativeScheduling:
          type: boolean
          default: false
        notes:
          type: array
          items:
            $ref: '#/components/schemas/MessageNote'
      example:
        sfEntityType: Message
        service: YOUTUBE
        content:
          sfEntityType: Video
          videoTitle: Cool video!
          description: That one guy doing that thing.
        assetIds:
        - xxx-xxx-xxx-xxx
        targetAccountIds:
        - '4'
    OptionalResponseLong:
      type: object
      properties:
        data:
          type: integer
          format: int64
        status:
          $ref: '#/components/schemas/CallStatus'
    TargetingProfile:
      type: object
      properties:
        targetingType:
          type: string
          enum:
          - ENHANCED
          - GATED
        targetingValues:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/TargetingValue'
    MessageNote:
      type: object
      description: A Note on the Message.
      properties:
        sfEntityType:
          type: string
          description: Spredfast internal entity type
          enum:
          - Note
        text:
          type: string
          description: The note's text content.
        id:
          type: string
          description: The note's ID. This should be left empty or set to 0 for new notes.
        createdByDisplayName:
          type: string
          description: The formatted name [firstName lastName] of the note's author.
          readOnly: true
        createdByUserId:
          type: string
          readOnly: true
        createdDate:
          type: string
          format: date-time
          readOnly: true
        lastModifiedByUserId:
          type: string
          readOnly: true
        lastModifiedDate:
          type: string
          format: date-time
          readOnly: true
    MessageContent:
      type: object
      discriminator:
        propertyName: sfEntityType
    MessageMultiPart:
      type: object
      properties:
        sfEntityType:
          type: string
          example: ImageShare
        caption:
          type: string
        id:
          type: string
        content:
          $ref: '#/components/schemas/MessageContent'
        title:
          type: string
        labels:
          type: array
          items:
            type: string
        service:
          type: string
          enum:
          - FACEBOOK
          - GOOGLEPLUS
          - SINAWEIBO
          - LINKEDIN
          - PINTEREST
          - YOUTUBE
          - VK
        targetAccountIds:
          type: array
          items:
            type: string
        organicVisibility:
          type: string
          enum:
          - VISIBLE
          - INVISIBLE
          - VISIBLE_POST_PUBLISH
        status:
          type: string
          enum:
          - DRAFT
          - PENDING
          - AWAITING_APPROVAL
          - REJECTED
          - PUBLISHED
          - ERROR
          - DELETED
          - NATIVELY_SCHEDULED
        delegationStatus:
          type: string
          enum:
          - NOT_DELEGATED
          - SCHEDULED_FOR_DELEGATION
          - DELEGATION_FAILED
          - DELEGATED
        publicationResults:
          type: array
          items:
            $ref: '#/components/schemas/PublicationResult'
        scheduledPublishDate:
          type: string
          format: date-time
        callbacks:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uri
        targetingProfile:
          $ref: '#/components/schemas/TargetingProfile'
        assetIds:
          type: array
          items:
            type: string
        planId:
          type: string
        nativeScheduling:
          type: boolean
          default: false
        notes:
          type: array
          items:
            $ref: '#/components/schemas/MessageNote'
      example:
        sfEntityType: Message
        service: FACEBOOK
        content:
          sfEntityType: ImageShare
          caption: Status Update w/ image
        targetAccountIds:
        - '4'
    PublicationResult:
      type: object
      properties:
        accountId:
          type: string
        serviceId:
          type: string
        serviceLink:
          type: string
        status:
          type: string
          enum:
          - PENDING
          - PUBLISHED
          - ERROR
          - DELETED
        datePublished:
          type: string
          format: date-time
    MessageSponsor:
      type: object
      description: A Sponsor for the Message. Currently, we only support attaching a single sponsor when posting to *only* Facebook *verified* Pages (a.k.a. Facebook Branded Content, see https://www.facebook.com/facebookmedia/get-started/branded-content for more info), so any attempt to use it either for other Social Networks or including targets that don't comply with this rule, will result in an error from the back-end. Note that the Sponsor itself is not restricted to be a verified page, so it could be a regular (non-verified) page or a regular user. As an example, a post could be created, targeting the Facebook verified page of @LeoMessi and that post could be sponsored by @nike.
      properties:
        profileId:
          type: string
          description: The sponsor's profile ID in the corresponding Social Network.
        displayName:
          type: string
          description: The sponsor's display name in the corresponding Social Network.
        link:
          type: string
          description: The link to the sponsor's profile in the corresponding Social Network.
    TargetingValue:
      type: object
      properties:
        subType:
          type: string
          enum:
          - COUNTRY
          - REGION
          - METRO
          - CONTINENT
          - ZIP_CODE
        value:
          type: string
        description:
          type: string
    CallStatus:
      type: object
      properties:
        succeeded:
          type: boolean
          readOnly: true
          default: false
        error:
          $ref: '#/components/schemas/ApiError'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://login.spredfast.com/v3/oauth/authorize
          tokenUrl: https://login.spredfast.com/v3/oauth/token
          scopes:
            all: Read/write access for all endpoints.
x-readme:
  explorer-enabled: false
  proxy-enabled: false
  samples-enabled: true