Mage Blocks API

Manage data loader, transformer, and data exporter blocks.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mage-ai-blocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mage-ai-blocks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Mage Blocks API
  description: REST API exposed by the self-hosted Mage data pipeline app. It covers triggering pipeline runs via API triggers (pipeline schedules), reading pipeline runs, and managing pipelines, blocks, and pipeline schedules. Requests are authenticated with an api_key (query parameter or request body) plus an OAuth token supplied via the OAUTH-TOKEN header or the oauth_token cookie. The default local server runs on port 6789.
  termsOfService: https://www.mage.ai/terms
  contact:
    name: Mage
    url: https://www.mage.ai
  version: '1.0'
servers:
- url: http://localhost:6789/api
  description: Default self-hosted Mage app
- url: https://{host}/api
  description: Custom self-hosted or Mage Pro cloud deployment
  variables:
    host:
      default: localhost:6789
      description: Host and port of the Mage deployment
security:
- ApiKeyAuth: []
  OAuthToken: []
tags:
- name: Blocks
  description: Manage data loader, transformer, and data exporter blocks.
paths:
  /pipelines/{uuid}/blocks:
    post:
      operationId: createBlock
      tags:
      - Blocks
      summary: Create a block in a pipeline
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBlockRequest'
      responses:
        '200':
          description: The created block.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockResponse'
  /pipelines/{uuid}/blocks/{block_uuid}:
    get:
      operationId: readBlock
      tags:
      - Blocks
      summary: Read a block in a pipeline
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      - name: block_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A single block.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockResponse'
    put:
      operationId: updateBlock
      tags:
      - Blocks
      summary: Update a block in a pipeline
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      - name: block_uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBlockRequest'
      responses:
        '200':
          description: The updated block.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockResponse'
    delete:
      operationId: deleteBlock
      tags:
      - Blocks
      summary: Delete a block from a pipeline
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      - name: block_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The deleted block.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockResponse'
components:
  schemas:
    UpdateBlockRequest:
      type: object
      properties:
        block:
          $ref: '#/components/schemas/Block'
    Block:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
          - data_loader
          - transformer
          - data_exporter
          - scratchpad
          - sensor
          - custom
        language:
          type: string
        upstream_blocks:
          type: array
          items:
            type: string
        downstream_blocks:
          type: array
          items:
            type: string
    BlockResponse:
      type: object
      properties:
        block:
          $ref: '#/components/schemas/Block'
    CreateBlockRequest:
      type: object
      required:
      - block
      properties:
        block:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
            language:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key
      description: API key passed as the api_key query parameter or in the request body.
    OAuthToken:
      type: apiKey
      in: header
      name: OAUTH-TOKEN
      description: Decoded OAuth token passed in the OAUTH-TOKEN header, or the raw token passed via the oauth_token cookie.