> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useinvent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Move block

> Reposition a block between two neighbors on its page.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/pages/{page_ref}/blocks/{block_id}/move
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/pages/{page_ref}/blocks/{block_id}/move:
    post:
      tags:
        - Pages
      summary: Move block
      description: Reposition a block between two neighbors on its page.
      parameters:
        - schema:
            type: string
          required: true
          description: Page slug or encoded page id
          name: page_ref
          in: path
        - schema:
            type: string
          required: true
          description: Block ID
          name: block_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MovePageBlockSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MovePageBlockSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageBlockSchema'
components:
  schemas:
    MovePageBlockSchema:
      type: object
      properties:
        after:
          type: string
          maxLength: 128
          title: After
          description: Place after this block id.
        before:
          type: string
          maxLength: 128
          title: Before
          description: Place before this block id.
    PageBlockSchema:
      type: object
      properties:
        id:
          type: string
          example: block_5Fb7…
        page_id:
          type: string
          example: page_5Fb7…
        type:
          $ref: '#/components/schemas/PageBlockTypeSchema'
        config:
          $ref: '#/components/schemas/PageBlockConfigSchema'
        table_id:
          type:
            - string
            - 'null'
          description: Source table for data blocks. Null when the table was deleted.
        view_id:
          type:
            - string
            - 'null'
          description: Embedded view for table blocks. Null when the view was deleted.
        position:
          type: string
          description: Fractional order within the page.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - page_id
        - type
        - config
        - table_id
        - view_id
        - position
        - created_at
        - updated_at
    PageBlockTypeSchema:
      type: string
      enum:
        - heading
        - text
        - stat
        - chart
        - table
        - pages
      title: Type
      description: The block type.
    PageBlockConfigSchema:
      type: object
      properties:
        shared:
          $ref: '#/components/schemas/PageBlockSharedConfigSchema'
        heading:
          $ref: '#/components/schemas/PageBlockHeadingConfigSchema'
        text:
          $ref: '#/components/schemas/PageBlockTextConfigSchema'
        stat:
          $ref: '#/components/schemas/PageBlockStatConfigSchema'
        chart:
          $ref: '#/components/schemas/PageBlockChartConfigSchema'
        table:
          $ref: '#/components/schemas/PageBlockTableConfigSchema'
        pages:
          $ref: '#/components/schemas/PageBlockPagesConfigSchema'
    PageBlockSharedConfigSchema:
      type: object
      properties:
        size:
          $ref: '#/components/schemas/PageBlockSizeSchema'
        height:
          $ref: '#/components/schemas/PageBlockHeightSchema'
      title: Layout
      description: Width and height of the block, for any block type.
    PageBlockHeadingConfigSchema:
      type: object
      properties:
        text:
          type: string
          maxLength: 255
          title: Text
          description: The heading text.
        level:
          anyOf:
            - type: number
              enum:
                - 1
            - type: number
              enum:
                - 2
          title: Heading Level
          description: 'Heading size: 1 for large, 2 for small. Defaults to 2.'
      title: Heading
      description: Settings for a heading block.
    PageBlockTextConfigSchema:
      type: object
      properties:
        markdown:
          type: string
          maxLength: 30000
          title: Content
          description: The text, in Markdown.
      title: Text
      description: Settings for a text block.
    PageBlockStatConfigSchema:
      type: object
      properties:
        label:
          type: string
          maxLength: 128
          title: Label
          description: Text shown above the number. Defaults to the table name.
        metric:
          $ref: '#/components/schemas/TableAggregateMetricSchema'
        window:
          $ref: '#/components/schemas/TableAggregateWindowSchema'
        filter:
          $ref: '#/components/schemas/FilterSchema'
        format:
          $ref: '#/components/schemas/PageBlockStatFormatSchema'
        compare:
          type: string
          enum:
            - previous_period
          title: Compare
          description: Adds the previous-period delta.
      title: Stat
      description: Settings for a stat block, which shows one number.
    PageBlockChartConfigSchema:
      type: object
      properties:
        label:
          type: string
          maxLength: 128
          title: Label
          description: Text shown above the chart. Defaults to the table name.
        kind:
          $ref: '#/components/schemas/PageBlockChartKindSchema'
        metric:
          $ref: '#/components/schemas/TableAggregateMetricSchema'
        group_by:
          $ref: '#/components/schemas/TableAggregateGroupBySchema'
        window:
          $ref: '#/components/schemas/TableAggregateWindowSchema'
        filter:
          $ref: '#/components/schemas/FilterSchema'
        limit:
          type: integer
          minimum: 1
          maximum: 50
          title: Groups
          description: How many of the largest groups to show, up to 50.
      title: Chart
      description: Settings for a chart block.
    PageBlockTableConfigSchema:
      type: object
      properties:
        limit:
          type: integer
          minimum: 1
          maximum: 50
          title: Rows
          description: Maximum number of rows to show, up to 50.
        interaction:
          $ref: '#/components/schemas/PageBlockTableInteractionSchema'
      title: Table
      description: Settings for a table block.
    PageBlockPagesConfigSchema:
      type: object
      properties:
        page_ids:
          type: array
          items:
            type: string
          maxItems: 50
          title: Linked Pages
          description: Pages to link, in display order.
        style:
          $ref: '#/components/schemas/PageBlockPagesStyleSchema'
      title: Pages
      description: Settings for a block that links to other pages.
    PageBlockSizeSchema:
      type: string
      enum:
        - sm
        - md
        - lg
        - full
      title: Size
      description: >-
        How wide the block is: a quarter, half, three quarters or the full page
        width.
    PageBlockHeightSchema:
      type: string
      enum:
        - sm
        - md
        - lg
        - xl
      title: Height
      description: Minimum height of the block. Without it, the block fits its content.
    TableAggregateMetricSchema:
      type: object
      properties:
        aggregation:
          $ref: '#/components/schemas/TableAggregationSchema'
        field_key:
          type: string
          minLength: 1
          maxLength: 64
          title: Field Key
          description: Number field key. Required for all but count.
      required:
        - aggregation
      title: Metric
      description: What to compute over the records.
    TableAggregateWindowSchema:
      type: object
      properties:
        field_key:
          type: string
          minLength: 1
          maxLength: 64
          title: Field Key
          description: Date field key.
        last:
          $ref: '#/components/schemas/TableAggregateWindowLastSchema'
      required:
        - field_key
        - last
      title: Date Window
      description: Rolling date window, resolved to real dates at query time.
    FilterSchema:
      anyOf:
        - $ref: '#/components/schemas/FilterRuleSchema'
        - $ref: '#/components/schemas/FilterGroupSchema'
    PageBlockStatFormatSchema:
      type: string
      enum:
        - number
        - currency
        - percent
      title: Format
      description: 'How the number is shown: as a number, a currency or a percent.'
    PageBlockChartKindSchema:
      type: string
      enum:
        - bar
        - line
        - area
        - donut
      title: Chart Type
      description: 'How the chart is drawn: bar, line, area or donut.'
    TableAggregateGroupBySchema:
      type: object
      properties:
        field_key:
          type: string
          minLength: 1
          maxLength: 64
          title: Field Key
          description: Field key to group the records by.
        bucket:
          $ref: '#/components/schemas/TableAggregateDateBucketSchema'
      required:
        - field_key
      title: Group by
      description: Split the result into one value per group of a field.
    PageBlockTableInteractionSchema:
      type: string
      enum:
        - readonly
        - open
        - edit
      title: Interaction
      description: >-
        How the embedded table reacts: readonly display, open the record panel,
        or edit inline. Defaults to open.
    PageBlockPagesStyleSchema:
      type: string
      enum:
        - cards
        - list
      title: Style
      description: 'How the linked pages are shown: as cards or as a list.'
    TableAggregationSchema:
      type: string
      enum:
        - count
        - sum
        - avg
        - min
        - max
      title: Aggregation
      description: >-
        How to combine the records: count them, or the sum, average, minimum or
        maximum of a number field.
    TableAggregateWindowLastSchema:
      type: string
      enum:
        - 7d
        - 30d
        - 90d
        - 365d
      title: Period
      description: How far back from now the window reaches.
    FilterRuleSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - rule
        key:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-z][a-z0-9_]{0,63}$
        operator:
          $ref: '#/components/schemas/FilterOperatorSchema'
        value: {}
      required:
        - type
        - key
        - operator
    FilterGroupSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - group
        combinator:
          $ref: '#/components/schemas/FilterCombinatorSchema'
        children:
          type: array
          items:
            $ref: '#/components/schemas/FilterSchema'
      required:
        - type
        - combinator
        - children
    TableAggregateDateBucketSchema:
      type: string
      enum:
        - day
        - week
        - month
      title: Date Bucket
      description: Required when grouping by a date field.
    FilterOperatorSchema:
      type: string
      enum:
        - contains
        - not_contains
        - eq
        - neq
        - gt
        - lt
        - gte
        - lte
        - before
        - after
        - on_or_before
        - on_or_after
        - in
        - not_in
        - is_empty
        - is_not_empty
    FilterCombinatorSchema:
      type: string
      enum:
        - and
        - or
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.