Slack Stars API

The Slack Stars API is a set of Web API methods that let apps manage a user's starred itemsSlack's legacy personal bookmarking feature. It allows adding or removing a star on items such as messages (via channel and timestamp), files, and file comments, and listing all items a user has starred, typically with pagination and basic metadata. Stars are user-specific and don't alter the underlying content; they simply mark things for quick reference.

OpenAPI Specification

slack-stars-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: "1.0"
  title: Slack Stars API
  description: "The Slack Stars API is a set of Web API methods that let apps manage a user\x19s starred items\x14Slack\x19s legacy personal bookmarking feature. It allows adding or removing a star on items
    such as messages (via channel and timestamp), files, and file comments, and listing all items a user has starred, typically with pagination and basic metadata. Stars are user-specific and don\x19t alter
    the underlying content; they simply mark things for quick reference. Note that Slack has moved toward Saved items and other mechanisms in the client, and the stars.* methods have been deprecated, so
    availability and support may be limited."
paths:
  /stars.add:
    post:
      tags:
      - Add
      - Post
      description: Adds a star to an item.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/stars.add
      operationId: postStarsAdd
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `stars:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: >-
                    Channel to add star to, or channel where the message to add
                    star to was posted (used with `timestamp`).
                file:
                  type: string
                  description: File to add star to.
                file_comment:
                  type: string
                  description: File comment to add star to.
                timestamp:
                  type: string
                  description: Timestamp of the message to add star to.
          application/json:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: >-
                    Channel to add star to, or channel where the message to add
                    star to was posted (used with `timestamp`).
                file:
                  type: string
                  description: File to add star to.
                file_comment:
                  type: string
                  description: File comment to add star to.
                timestamp:
                  type: string
                  description: Timestamp of the message to add star to.
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: stars.add schema
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: false
                description: Schema for successful response from stars.add method
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: stars.add error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - bad_timestamp
                    - message_not_found
                    - file_not_found
                    - file_comment_not_found
                    - channel_not_found
                    - no_item_specified
                    - already_starred
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - token_revoked
                    - no_permission
                    - org_login_required
                    - invalid_arg_name
                    - invalid_array_arg
                    - invalid_charset
                    - invalid_form_data
                    - invalid_post_type
                    - missing_post_type
                    - team_added_to_org
                    - invalid_json
                    - json_not_object
                    - request_timeout
                    - upgrade_required
                    - fatal_error
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from stars.add method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - stars:write
      summary: Slack Post Stars Add
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /stars.list:
    get:
      tags:
      - Get
      - Lists
      description: Lists stars for a user.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/stars.list
      operationId: getStarsList
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `stars:read`'
        schema:
          type: string
      - name: count
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: string
      - name: cursor
        in: query
        description: >-
          Parameter for pagination. Set `cursor` equal to the `next_cursor`
          attribute returned by the previous request's `response_metadata`.
          This parameter is optional, but pagination is mandatory: the default
          value simply fetches the first "page" of the collection. See
          [pagination](/docs/pagination) for more details.
        schema:
          type: string
      - name: limit
        in: query
        description: >-
          The maximum number of items to return. Fewer than the requested
          number of items may be returned, even if the end of the list hasn't
          been reached.
        schema:
          type: integer
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: stars.list schema
                required:
                - items
                - ok
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                  paging:
                    $ref: '#/components/schemas/objs_paging'
                additionalProperties: false
                description: Schema for successful response from stars.list method
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: stars.list error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - token_revoked
                    - no_permission
                    - org_login_required
                    - user_is_bot
                    - invalid_arg_name
                    - invalid_array_arg
                    - invalid_charset
                    - invalid_form_data
                    - invalid_post_type
                    - missing_post_type
                    - team_added_to_org
                    - invalid_json
                    - json_not_object
                    - request_timeout
                    - upgrade_required
                    - fatal_error
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from stars.list method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - stars:read
      summary: Slack Get Stars List
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /stars.remove:
    post:
      tags:
      - Post
      - Remove
      description: Removes a star from an item.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/stars.remove
      operationId: postStarsRemove
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `stars:write`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: >-
                    Channel to remove star from, or channel where the message to
                    remove star from was posted (used with `timestamp`).
                file:
                  type: string
                  description: File to remove star from.
                file_comment:
                  type: string
                  description: File comment to remove star from.
                timestamp:
                  type: string
                  description: Timestamp of the message to remove star from.
          application/json:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: >-
                    Channel to remove star from, or channel where the message to
                    remove star from was posted (used with `timestamp`).
                file:
                  type: string
                  description: File to remove star from.
                file_comment:
                  type: string
                  description: File comment to remove star from.
                timestamp:
                  type: string
                  description: Timestamp of the message to remove star from.
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: stars.remove schema
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: false
                description: Schema for successful response from stars.remove method
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: stars.remove error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - bad_timestamp
                    - message_not_found
                    - file_not_found
                    - file_comment_not_found
                    - channel_not_found
                    - no_item_specified
                    - not_starred
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - token_revoked
                    - no_permission
                    - org_login_required
                    - invalid_arg_name
                    - invalid_array_arg
                    - invalid_charset
                    - invalid_form_data
                    - invalid_post_type
                    - missing_post_type
                    - team_added_to_org
                    - invalid_json
                    - json_not_object
                    - request_timeout
                    - upgrade_required
                    - fatal_error
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from stars.remove method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - stars:write
      summary: Slack Post Stars Remove
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas: {}
tags:
- name: Add
- name: Get
- name: Lists
- name: Post
- name: Remove