openapi: 3.0.0
info:
  contact:
    email: amplify.devs@hootsuite.com
    name: Hootsuite, Amplify Team
    url: https://hootsuite.com/products/amplify
  description: |
    [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/b2c92b2ac637931e993a)

    # Introduction

    The Hootsuite Amplify API is built on REST principles and uses JSON as a data interchange format.

    All URLs referenced in this document use the following base: https://platform.hootsuite.com/amplify/. The Amplify API is served over HTTPS to ensure data privacy.

    ## API Access
    If you need help getting access to the API, please visit [Hootsuite's documentation](/parliament/overview#requirements--setup).

    ## User Permissions
    Ensure the user you authenticate with has `Content Admin` permissions both enabled within Amplify, otherwise you might get `403 Forbidden` responses for some of the requests. You can set this permission level within User Management in Amplify dashboard app in Hootsuite.

    ## Response Format

    All responses are returned in JSON. A successful response is wrapped in a top level data envelope which is an object or array depending on whether a single item or a collection is returned. If a single item is returned the data field will be an object.

    Successful single item response:
    ```json
    {
        "data": {}
    }
    ```

    Successful collection response:
    ```json
    {
        "data": [{}, {}, {}]
    }
    ```

    ### Response Codes
    The Amplify API uses HTTP status codes to indicate the status of your request.

    | Code             | Description                                         |
    |------------------|-----------------------------------------------------|
    | 200 OK           | Resource was successfully retrieved or updated.     |
    | 400 Bad Request  | Invalid request, possibly due to missing parameters |
    | 401 Unauthorized | Missing or invalid authentication                   |
    | 403 Forbidden    | Access denied                                       |
    | 404 Not Found    | Requested resource does not exist                   |
    | 500 Server Error | Unexpected error occurred on the server             |

    ## Error Handling
    If the response was unsuccessful, an errors array will be returned along with a generic message:

    ```json
    {
        "message": "",
        "errors": [{
            "uuid": "1a4d81f1-39b0-4734-ad76-46f093895e5a",
            "code": "2000",
            "message": "Message does not exist."
        }]
    }
    ```
    `uuid` is a unique ID for purposes of tracing the error, while `code` and `message` map to the error codes below.

    ### Error Codes

    Here is a list of error codes and descriptions returned by our API:

    | Error Code | Description                                             |
    |------------|---------------------------------------------------------|
    | 2000       | Document does not exist.                                |
    | 3000       | Access forbidden to document.                           |
    | 3001       | User does not have the permission for requested action. |


    # Authentication

    For information about Authentication, visit our [official documentation](/api-reference/rest-api/authentication/).

    # Pagination

    Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the `page` parameter and number of items per page with `per_page` parameter. Maximum allowed per page is 100.

    ```sh
    curl "https://platform.hootsuite.com/amplify/v1/me/messages?page=2&per_page=100"
    ```

    Note that page numbering starts with 1 and omitting the `page` parameter will return the first page.

    ### Link Header

    Every valid request to a resource endpoint is responded with a [Link header](http://tools.ietf.org/html/rfc5988) which includes pagination information. You should form calls with these `Link` header values instead of constructing your own URLs:

        Link: <https://platform.hootsuite.com/amplify/v1/me/messages?page=3&per_page=30>; rel="next",
              <https://platform.hootsuite.com/amplify/v1/me/messages?page=9&per_page=30>; rel="last"

    *Note that this example includes a line break for readability, the actual response doesn't.*

    This `Link` response header contains one or more Hypermedia link relations, some of which may require expansion as [URI templates](http://tools.ietf.org/html/rfc6570).

    The possible `rel` values are:

    | Name  | Description                                                   |
    |-------|---------------------------------------------------------------|
    | next  | The link relation for the immediate next page of results.     |
    | last  | The link relation for the last page of results.               |
    | first | The link relation for the first page of results.              |
    | prev  | The link relation for the immediate previous page of results. |
  license:
    name: Hootsuite Developer Terms and API License Agreement
    url: https://hootsuite.com/legal/dev-api-terms
  termsOfService: https://hootsuite.com/legal/dev-api-terms
  title: Hootsuite Amplify REST API
  version: "1.0"
paths:
  /me/:
    get:
      operationId: get_me
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      email:
                        example: john.doe@hootsuite.com
                        type: string
                      name:
                        description: Member's name
                        example: John Doe
                        type: string
                      roles:
                        description: Member's roles
                        example:
                          - subscriber
                          - content_admin
                        items:
                          type: string
                        type: array
                    type: object
                type: object
      summary: Gets the member information
      tags:
        - me
  /me/messages:
    post:
      operationId: post_messages
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    expiryDate:
                      description: The date message expired (if any)
                      example: 2017-10-23T16:42:23.141Z
                      format: date-time
                      type: string
                    isPinned:
                      default: false
                      description: Whether the message is featured (shown at the top) on Amplify or not
                      example: false
                      type: boolean
                    isShareable:
                      default: true
                      description: Returns false for announcements, and true for everything else
                      example: true
                      type: boolean
                    owlyPhotoAttachment:
                      allOf:
                        - properties:
                            mimeType:
                              example: image/jpeg
                              type: string
                            thumbnailUrl:
                              example: https://somethumbnail.jpeg
                              type: string
                            url:
                              example: https://somethumbnail.jpeg
                              type: string
                          type: object
                      description: Original high quality image of the message (suggested to use whenever posting message to social networks)
                    photoUrl:
                      description: URL of the photo shared in the message
                      example: https://one-photo.jpeg
                      type: string
                    privacySettings:
                      allOf:
                        - properties:
                            tiktokbusiness:
                              allOf:
                                - properties:
                                    allowComments:
                                      default: true
                                      description: Whether comments are allowed for TikTok posts
                                      example: true
                                      type: boolean
                                    allowDuet:
                                      default: true
                                      description: Whether duets are allowed for TikTok posts
                                      example: true
                                      type: boolean
                                    allowStitch:
                                      default: true
                                      description: Whether stitching is allowed for TikTok posts
                                      example: true
                                      type: boolean
                                  type: object
                              description: TikTok-specific privacy settings
                          type: object
                      description: Privacy settings for different social networks
                    publishedDate:
                      description: The date message was published (made visible to all Amplify users)
                      example: 2017-10-16T16:42:23.141Z
                      format: date-time
                      type: string
                    shareableNetworks:
                      allOf:
                        - properties:
                            facebook:
                              example: true
                              type: boolean
                            facebookpage:
                              example: true
                              type: boolean
                            instagram:
                              example: false
                              type: boolean
                            linkedin:
                              example: true
                              type: boolean
                            tiktokbusiness:
                              example: true
                              type: boolean
                            twitter:
                              example: true
                              type: boolean
                          type: object
                      description: Map of social networks and whether or not the message can be shared in them
                    text:
                      description: Entire message text
                      example: 5 tips to accelerate your career in a hyper-growth company
                      type: string
                    topics:
                      description: List of all topics message is tagged with
                      example:
                        - HootsuiteLife
                        - Career
                      items:
                        type: string
                      type: array
                    whyShareThisPost:
                      default: ""
                      description: Internal note explaining why advocates should share this post. Not published to social networks.
                      example: Worth sharing with the team
                      type: string
                  type: object
                - properties:
                    isEditable:
                      default: false
                      description: Should this message be editable?
                      example: false
                      type: boolean
                    isNativeShareEnabled:
                      default: false
                      description: Should native share be allowed for the posts in this org?
                      example: false
                      type: boolean
                    isPublished:
                      default: false
                      description: Has this message been published?
                      example: false
                      type: boolean
                    isSuggested:
                      default: false
                      description: Whether a message is a suggestion. Message will default to a draft post
                      example: false
                      type: boolean
                    photoUriBase64:
                      description: Base 64 image URL
                      example: data:image/gif;base64,R0lGODlhEAAQAM...
                      type: string
                    srcNetwork:
                      default: ""
                      description: Network where we are posting this message from
                      type: string
                    srcUser:
                      default: ""
                      description: When the message has been shared by Twitter or Facebook, this field will contain the original user that shared the post
                      example: twitter_techie
                      type: string
                    suggestionReason:
                      default: ""
                      description: Reason why this message was suggested
                      type: string
                  type: object
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    allOf:
                      - properties:
                          expiryDate:
                            description: The date message expired (if any)
                            example: 2017-10-23T16:42:23.141Z
                            format: date-time
                            type: string
                          isPinned:
                            default: false
                            description: Whether the message is featured (shown at the top) on Amplify or not
                            example: false
                            type: boolean
                          isShareable:
                            default: true
                            description: Returns false for announcements, and true for everything else
                            example: true
                            type: boolean
                          owlyPhotoAttachment:
                            allOf:
                              - properties:
                                  mimeType:
                                    example: image/jpeg
                                    type: string
                                  thumbnailUrl:
                                    example: https://somethumbnail.jpeg
                                    type: string
                                  url:
                                    example: https://somethumbnail.jpeg
                                    type: string
                                type: object
                            description: Original high quality image of the message (suggested to use whenever posting message to social networks)
                          photoUrl:
                            description: URL of the photo shared in the message
                            example: https://one-photo.jpeg
                            type: string
                          privacySettings:
                            allOf:
                              - properties:
                                  tiktokbusiness:
                                    allOf:
                                      - properties:
                                          allowComments:
                                            default: true
                                            description: Whether comments are allowed for TikTok posts
                                            example: true
                                            type: boolean
                                          allowDuet:
                                            default: true
                                            description: Whether duets are allowed for TikTok posts
                                            example: true
                                            type: boolean
                                          allowStitch:
                                            default: true
                                            description: Whether stitching is allowed for TikTok posts
                                            example: true
                                            type: boolean
                                        type: object
                                    description: TikTok-specific privacy settings
                                type: object
                            description: Privacy settings for different social networks
                          publishedDate:
                            description: The date message was published (made visible to all Amplify users)
                            example: 2017-10-16T16:42:23.141Z
                            format: date-time
                            type: string
                          shareableNetworks:
                            allOf:
                              - properties:
                                  facebook:
                                    example: true
                                    type: boolean
                                  facebookpage:
                                    example: true
                                    type: boolean
                                  instagram:
                                    example: false
                                    type: boolean
                                  linkedin:
                                    example: true
                                    type: boolean
                                  tiktokbusiness:
                                    example: true
                                    type: boolean
                                  twitter:
                                    example: true
                                    type: boolean
                                type: object
                            description: Map of social networks and whether or not the message can be shared in them
                          text:
                            description: Entire message text
                            example: 5 tips to accelerate your career in a hyper-growth company
                            type: string
                          topics:
                            description: List of all topics message is tagged with
                            example:
                              - HootsuiteLife
                              - Career
                            items:
                              type: string
                            type: array
                          whyShareThisPost:
                            default: ""
                            description: Internal note explaining why advocates should share this post. Not published to social networks.
                            example: Worth sharing with the team
                            type: string
                        type: object
                      - properties:
                          content:
                            description: Detailed message content structure including organic and amplify properties
                            type: object
                          createdDate:
                            description: Date of creation
                            example: 2017-10-16T16:42:23.141Z
                            format: date-time
                            type: string
                          id:
                            description: Unique identifier for the message
                            example: 59d6df3c6bc0160ba6e15f73
                            type: string
                          isDeleted:
                            description: It tells if this message is considered deleted or not
                            example: false
                            type: boolean
                          isReshareable:
                            description: Whether the message is retweetable on Twitter or reshareable on Facebook
                            example: false
                            type: boolean
                          isReshareableWithThoughts:
                            description: Whether the message is allowed to be reshared with added comment
                            example: false
                            type: boolean
                          pdfAttachment:
                            type: object
                          raw_message:
                            type: object
                          url:
                            description: Link shared in the message
                            example: http://ow.ly/fjzz30fU6EK
                            type: string
                          videoAttachment:
                            type: object
                        type: object
                type: object
      summary: Create message using the authenticated member
      tags:
        - me
  /me/organizations:
    get:
      operationId: get_my_organizations
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        enabledNetworks:
                          properties:
                            facebook:
                              example: true
                              type: boolean
                            facebookpage:
                              example: true
                              type: boolean
                            hootsuite:
                              example: true
                              type: boolean
                            instagram:
                              example: false
                              type: boolean
                            linkedin:
                              example: true
                              type: boolean
                            tiktokbusiness:
                              example: true
                              type: boolean
                            twitter:
                              example: true
                              type: boolean
                          type: object
                        hootId:
                          description: Hootsuite organization ID
                          example: 123456
                          type: integer
                        id:
                          description: ID of the organization
                          example: 59d6df3c6bc0160ba6e15f73
                          type: string
                        name:
                          description: Name of the organization
                          example: Hootsuite Inc.
                          type: string
                      type: object
                    type: array
                type: object
      summary: Retrieve authenticated members's organizations
      tags:
        - me
  /me/topics:
    get:
      operationId: get_topics
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        count:
                          description: Messages tagged with this topic
                          example: 0
                          type: integer
                        lastActivityDate:
                          description: Last time a message was tagged with this topic
                          example: 2017-10-23T16:42:23.141Z
                          format: date-time
                          type: string
                        name:
                          description: Name of the topic
                          example: sports
                          type: string
                        privacy:
                          default: opened
                          description: Privacy of the topic
                          enum:
                            - opened
                            - closed
                          example: opened
                          type: string
                      type: object
                    type: array
                type: object
      summary: Retrieve authenticated members's topics
      tags:
        - me
    post:
      operationId: post_topics
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  description: Name of the topic
                  example: sports
                  type: string
                privacy:
                  description: Privacy of the topic
                  enum:
                    - opened
                    - closed
                  example: opened
                  type: string
              type: object
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      count:
                        description: Messages tagged with this topic
                        example: 0
                        type: integer
                      lastActivityDate:
                        description: Last time a message was tagged with this topic
                        example: 2017-10-23T16:42:23.141Z
                        format: date-time
                        type: string
                      name:
                        description: Name of the topic
                        example: sports
                        type: string
                      privacy:
                        default: opened
                        description: Privacy of the topic
                        enum:
                          - opened
                          - closed
                        example: opened
                        type: string
                    type: object
                type: object
      summary: Creates a new topic on the member's organization
      tags:
        - me
  /me/utms/deobfuscate:
    post:
      description: |-
        It is important to note that multiple obfuscated member IDs
        can point to a single member ID.
      operationId: post_utms
      parameters:
        - description: An optional fields mask
          in: header
          name: X-Fields
          schema:
            type: string
            format: mask
      requestBody:
        content:
          application/json:
            schema:
              properties:
                ids:
                  description: Obfuscated memberIDs (max 500 per request)
                  example: '[ "ABCDEF", "DEFGHI", "GHIJKL"]'
                  items:
                    type: string
                  type: array
              type: object
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        memberID:
                          description: Employee memberID
                          example: "123456"
                          type: string
                        obfuscatedID:
                          description: Obfuscated memberID
                          example: ABCDEF
                          type: string
                      type: object
                    type: array
                type: object
      summary: Converts obfuscated member IDs back into member IDs
      tags:
        - me
tags:
  - description: Operations that you can do related with your authenticated member
    name: me
    x-displayName: Account
servers:
  - url: https://platform.hootsuite.com/amplify/v1
