Docupilot content_blocks API

The content_blocks API from Docupilot — 14 operation(s) for content_blocks.

OpenAPI Specification

docupilot-content-blocks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai content_blocks API
  version: '1.0'
  description: Docupilot accounts APIs
  termsOfService: https://docupilot.app/terms-and-conditions/
  contact:
    name: Team Docupilot
    email: support@docupilot.app
tags:
- name: content_blocks
paths:
  /dashboard/api/v2/content_blocks/:
    get:
      operationId: list_content_blocks
      summary: Get list of content blocks
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedContentBlockList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_content_block
      summary: Create content_block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/NewContentBlock'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/api/v2/content_blocks/{content_block_id}/permissions/:
    get:
      operationId: list_content_block_sharing
      summary: Get all shared permissions for specific content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: content_block_id
        schema:
          type: integer
        required: true
      tags:
      - content_blocks
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContentBlockSharing'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_content_block_sharing_permission
      summary: Create content block sharing permission
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: content_block_id
        schema:
          type: integer
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ContentBlockSharing'
          application/x-www-form-urlencoded:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ContentBlockSharing'
          multipart/form-data:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ContentBlockSharing'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '201':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContentBlockSharing'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{content_block_id}/permissions/{id}/:
    get:
      operationId: get_content_block_sharing
      summary: Get specific permission details for given content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: content_block_id
        schema:
          type: integer
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block sharing setting.
        required: true
      tags:
      - content_blocks
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlockSharing'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    patch:
      operationId: update_content_block_sharing_permission
      summary: Update content block content partially
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: content_block_id
        schema:
          type: integer
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block sharing setting.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUpdateContentBlockSharing'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUpdateContentBlockSharing'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdateContentBlockSharing'
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlockSharing'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    delete:
      operationId: revoke_content_block_sharing_permission
      summary: Revoke content block sharing permission
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: content_block_id
        schema:
          type: integer
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block sharing setting.
        required: true
      tags:
      - content_blocks
      security:
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/:
    get:
      operationId: get_content_block
      summary: Get one content_block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    put:
      operationId: update_content_block
      summary: Update content_block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentBlock'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ContentBlock'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ContentBlock'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    patch:
      operationId: update_content_block_data
      summary: Update content block data
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdateNewContentBlock'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    delete:
      operationId: delete_content_block
      summary: Delete a content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/copy/:
    post:
      operationId: copy_content_block
      summary: Copy content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyContentBlock'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CopyContentBlock'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CopyContentBlock'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/download/:
    get:
      operationId: download_content_block_file
      summary: Download content block file
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            text/html:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.presentationml.presentation:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/editor_version/:
    patch:
      operationId: update_content_block_editor_version
      summary: Update the content block editor version between v1 and v2
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedContentBlockEditorVersion'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedContentBlockEditorVersion'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedContentBlockEditorVersion'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlockEditorVersion'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/inline_image/:
    post:
      operationId: upload_inline_image_of_content_block
      summary: Upload inline image of content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadContentBlockImage'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '200':
          description: No response body
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/preview/:
    get:
      operationId: preview_content_block_file
      summary: Preview content block file
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: query
        name: format
        schema:
          type: string
          enum:
          - json
          - octet-stream
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/schema/:
    get:
      operationId: get_content_block_schema
      summary: Get content block schema
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateSchema'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/templates/:
    get:
      operationId: list_content_block_templates
      summary: List content block templates
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTemplateInfoList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/test/:
    post:
      operationId: test_content_block
      summary: Test a content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestContentBlock'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/content_blocks/{id}/test_data/:
    get:
      operationId: get_test_data_for_content_block
      summary: Get test data used for testing content block
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content block.
        required: true
      tags:
      - content_blocks
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBlock'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/conte

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docupilot/refs/heads/main/openapi/docupilot-content-blocks-api-openapi.yml