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

# Add a block

> Adds a block at the end of the page. A page can have up to 200 blocks. Commerce and embed blocks cannot be created through the API.

**Required permission:** `biolinks:pages:write`

Changing an **active** page also needs `biolinks:pages:publish`.



## OpenAPI

````yaml /api-reference/biolinks.openapi.json post /pages/{page}/blocks
openapi: 3.1.0
info:
  title: Link in Bio API
  version: 1.0.0
  description: >-
    Link-in-bio pages and their blocks, short links, QR codes, tracking pixels,
    form submissions, analytics and custom domains.
servers:
  - url: https://{domain}/api/v1/biolinks
    description: Your platform domain
    variables:
      domain:
        default: app.example.com
        description: The domain you sign in to, without https://
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Pages
  - name: Blocks
  - name: Short links
  - name: Catalogue
  - name: Analytics
  - name: Submissions
  - name: QR codes
  - name: Pixels
  - name: Domains
paths:
  /pages/{page}/blocks:
    post:
      tags:
        - Blocks
      summary: Add a block
      description: >-
        Adds a block at the end of the page. A page can have up to 200 blocks.
        Commerce and embed blocks cannot be created through the API.


        **Required permission:** `biolinks:pages:write`


        Changing an **active** page also needs `biolinks:pages:publish`.
      operationId: blocks.store
      parameters:
        - name: page
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Page ID.
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 8
            maxLength: 200
          description: >-
            8–200 letters, digits, `.`, `_`, `:` or `-`. Retry with the same key
            and exact same body to get the original response.
        - name: If-Match
          in: header
          required: true
          schema:
            type: string
            example: '"a1b2c3"'
          description: >-
            The current `revision` in quotes, from the resource's `ETag`.
            Missing returns `428`; out of date returns `412`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  example: link
                  description: A block type from the catalogue.
                enabled:
                  type: boolean
                content:
                  type: object
                  example:
                    title: Shop the sale
                    url: https://example.com/sale
                  description: >-
                    Fields for this block type. See `write_schema` in the
                    catalogue.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Block'
                  page_revision:
                    type: string
                    description: The page's new revision.
components:
  schemas:
    Block:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          example: link
        position:
          type: integer
        enabled:
          type: boolean
        content_supported:
          type: boolean
          description: >-
            `false` for block types the API cannot edit (commerce, embeds).
            Their `content` is empty.
        content:
          type: object
          description: Fields depend on `type`. See `write_schema` in Get the catalogue.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A workspace API key: `Authorization: Bearer osk_...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: The same workspace API key in the `x-api-key` header.

````

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