Slack Publish API

The Publish API from Slack — 1 operation(s) for publish.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

slack-publish-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Slack Admin Access Publish API
  description: "The Slack Admin API is a set of privileged endpoints\x14primarily under admin.* with related SCIM and Audit Logs APIs\x14that lets Enterprise Grid owners and admins automate organization\x11 wide management and governance. It covers user lifecycle (provision, suspend, assign roles), workspace and channel administration across workspaces (create, move, archive channels; manage membership and settings), app governance (approve/deny or allowlist/ban apps and install them to workspaces), invite request handling, and security/compliance controls such as information barriers, session and authentication policies, and org\x11level analytics exports. These APIs require elevated admin scopes and are commonly used to power automated onboarding/offboarding, centralized channel and app controls, and integrations with identity, ITSM, and compliance systems."
tags:
- name: Publish
paths:
  /views.publish:
    get:
      tags:
      - Publish
      description: Publish a static view for a User.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/views.publish
      operationId: getViewsPublish
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `none`'
        required: true
        schema:
          type: string
      - name: user_id
        in: query
        description: '`id` of the user you want publish a view to.'
        required: true
        schema:
          type: string
      - name: view
        in: query
        description: A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.
        required: true
        schema:
          type: string
      - name: hash
        in: query
        description: A string that represents view state to protect against possible race conditions.
        schema:
          type: string
      responses:
        '200':
          description: Typical success response includes the published view payload.
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
                view:
                  app_id: AA4928AQ
                  blocks:
                  - block_id: 2WGp9
                    text:
                      text: A simple section with some sample sentence.
                      type: mrkdwn
                      verbatim: false
                    type: section
                  bot_id: BA13894H
                  callback_id: identify_your_home_tab
                  clear_on_close: false
                  close: null
                  external_id: ''
                  hash: '156772938.1827394'
                  id: VMHU10V25
                  notify_on_close: false
                  previous_view_id: null
                  private_metadata: Shh it is a secret
                  root_view_id: VMHU10V25
                  state:
                    values: {}
                  submit: null
                  team_id: T8N4K1JN
                  type: home
        default:
          description: Typical error response, before getting to any possible validation errors.
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_arguments
                ok: false
                response_metadata:
                  messages:
                  - invalid `user_id`
      security:
      - slackAuth:
        - none
      summary: Slack Get Views Publish
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK