Marketo Snippets API

Snippet Controller

Operations 13

GET /rest/asset/v1/snippet/{id}.json Get Snippet by Id #
POST /rest/asset/v1/snippet/{id}.json Update Snippet Metadata #
POST /rest/asset/v1/snippet/{id}/approveDraft.json Approve Snippet Draft #
POST /rest/asset/v1/snippet/{id}/clone.json Clone Snippet #
GET /rest/asset/v1/snippet/{id}/content.json Get Snippet Content #
POST /rest/asset/v1/snippet/{id}/content.json Update Snippet Content #
POST /rest/asset/v1/snippet/{id}/delete.json Delete Snippet #
POST /rest/asset/v1/snippet/{id}/discardDraft.json Discard Snippet Draft #
GET /rest/asset/v1/snippet/{id}/dynamicContent.json Get Dynamic Content #
POST /rest/asset/v1/snippet/{id}/dynamicContent/{segmentId}.json Update Snippet Dynamic Content #
POST /rest/asset/v1/snippet/{id}/unapprove.json Unapprove Snippet #
GET /rest/asset/v1/snippets.json Get Snippets #
POST /rest/asset/v1/snippets.json Create Snippet #

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/marketo-snippets-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

marketo-snippets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Marketo Engage Rest API
  version: '1.0'
  title: Marketo Engage Rest Snippets API
  termsOfService: https://www.adobe.com/legal.html
  contact:
    name: Adobe Developer Relations
    url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/home
    email: ''
  license:
    name: API License Agreement
    url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/api-license
servers:
- url: https://localhost:8080/
tags:
- name: Snippets
  description: Snippet Controller
paths:
  /rest/asset/v1/snippet/{id}.json:
    get:
      tags:
      - Snippets
      summary: Get Snippet by Id
      description: 'Retrieves the target snippet record. Required Permissions: Read-Only Assets, Read-Write Assets'
      operationId: getSnippetByIdUsingGET
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      - name: status
        in: query
        description: Status filter for draft or approved versions
        required: false
        schema:
          type: string
          enum:
          - approved
          - draft
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
    post:
      tags:
      - Snippets
      summary: Update Snippet Metadata
      description: 'Updates the metadata of the snippet. Required Permissions: Read-Write Assets'
      operationId: updateSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateSnippetRequest'
        description: updateSnippetRequest
        required: true
  /rest/asset/v1/snippet/{id}/approveDraft.json:
    post:
      tags:
      - Snippets
      summary: Approve Snippet Draft
      description: 'Approves the current draft of the snippet. Required Permissions: Approve Assets'
      operationId: approveSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
  /rest/asset/v1/snippet/{id}/clone.json:
    post:
      tags:
      - Snippets
      summary: Clone Snippet
      description: 'Clones the target snippet. Required Permissions: Read-Write Assets'
      operationId: cloneSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CloneSnippetRequest'
        description: cloneSnippetRequest
  /rest/asset/v1/snippet/{id}/content.json:
    get:
      tags:
      - Snippets
      summary: Get Snippet Content
      description: 'Retrieves the content of the target snippet. Required Permissions: Read-Only Assets, Read-Write Assets'
      operationId: getSnippetContentByIdUsingGET
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      - name: status
        in: query
        description: Status filter for draft or approved versions
        required: false
        schema:
          type: string
          enum:
          - approved
          - draft
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetContentResponse'
    post:
      tags:
      - Snippets
      summary: Update Snippet Content
      description: 'Updates the content of the target snippet. Required Permissions: Read-Write Assets'
      operationId: updateContentUsingPOST_1
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      - name: content
        in: query
        description: Content of the snippet
        required: true
        schema:
          type: string
      - name: type
        in: query
        description: Type of snippet content
        required: true
        schema:
          type: string
          enum:
          - DynamicContent
          - HTML
          - Text
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfIdResponse'
  /rest/asset/v1/snippet/{id}/delete.json:
    post:
      tags:
      - Snippets
      summary: Delete Snippet
      description: 'Deletes the target snippet. The snippet may not be in use by emails or landing pages. Required Permissions: Read-Write Assets'
      operationId: deleteSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfIdResponse'
  /rest/asset/v1/snippet/{id}/discardDraft.json:
    post:
      tags:
      - Snippets
      summary: Discard Snippet Draft
      description: 'Discards the current draft of the snippet. Required Permissions: Read-Write Assets'
      operationId: discardSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfIdResponse'
  /rest/asset/v1/snippet/{id}/dynamicContent.json:
    get:
      tags:
      - Snippets
      summary: Get Dynamic Content
      description: 'Gets the list of dynamic content sections for the snippet. Required Permissions: Read-Only Assets, Read-Write Assets'
      operationId: getDynamicContentUsingGET
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      - name: status
        in: query
        description: Status filter for draft or approved versions
        required: false
        schema:
          type: string
          enum:
          - approved
          - draft
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelResponse'
  /rest/asset/v1/snippet/{id}/dynamicContent/{segmentId}.json:
    post:
      tags:
      - Snippets
      summary: Update Snippet Dynamic Content
      description: 'Updates the target dynamic content section. Required Permissions: Read-Write Assets'
      operationId: updateDynamicContentUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      - name: segmentId
        in: path
        description: segmentId
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfIdResponse'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateSnippetDynamicContentRequest'
        description: request
        required: true
  /rest/asset/v1/snippet/{id}/unapprove.json:
    post:
      tags:
      - Snippets
      summary: Unapprove Snippet
      description: 'Unapproves the current version of the snippet. The snippet may not be in use. The snippet will be reverted to a draft-only state. Required Permissions: Approve Assets'
      operationId: unapproveSnippetUsingPOST
      parameters:
      - name: id
        in: path
        description: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
  /rest/asset/v1/snippets.json:
    get:
      tags:
      - Snippets
      summary: Get Snippets
      description: 'Retrieves a list of accessible snippets from the target instance. Required Permissions: Read-Only Assets, Read-Write Assets.


        Note: Fragments created with the new email designer may appear in this API''s response, but some of the fields may be null or incomplete. For complete and reliable details of these assets, use the Fragments (New) APIs; refer to the <a href="https://developer.adobe.com/marketo-apis/api/asset#operation/filterContentUsingGET_fragment">List Fragments</a> endpoint.'
      operationId: getSnippetUsingGET
      parameters:
      - name: status
        in: query
        description: Status filter for draft or approved versions
        required: false
        schema:
          type: string
          enum:
          - approved
          - draft
      - name: maxReturn
        in: query
        description: Maximum number of records to return. Max 200, default 20
        required: false
        schema:
          type: integer
          format: int32
      - name: offset
        in: query
        description: Integer offset for paging
        required: false
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
    post:
      tags:
      - Snippets
      summary: Create Snippet
      description: 'Creates a new snippet. Required Permissions: Read-Write Assets'
      operationId: createSnippetUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSnippetResponse'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateSnippetRequest'
        description: createSnippetRequest
        required: true
components:
  schemas:
    Error:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Error code of the error. See full list of error codes <a href="https://developers.marketo.com/rest-api/error-codes/">here</a>
        message:
          type: string
          description: Message describing the cause of the error
    Folder:
      type: object
      required:
      - id
      - type
      properties:
        id:
          type: integer
          format: int32
          description: Id of the folder
        type:
          type: string
          description: Type of folder
          enum:
          - Folder
          - Program
      description: JSON representation of a folder
    ResponseOfSnippetResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        requestId:
          type: string
        result:
          type: array
          items:
            $ref: '#/components/schemas/SnippetResponse'
        success:
          type: boolean
        warnings:
          type: array
          items:
            type: string
    SnippetFolder:
      type: object
      required:
      - value
      - type
      - folderName
      properties:
        value:
          type: integer
          format: int32
          description: Id of the folder
        type:
          type: string
          description: Type of folder
          enum:
          - Folder
          - Program
        folderName:
          type: string
          description: Name of folder
      description: JSON representation of a folder
    SnippetResponse:
      type: object
      required:
      - folder
      - status
      properties:
        createdAt:
          type: string
          format: date-time
          description: Datetime the asset was created
        description:
          type: string
          description: Description of the asset
        folder:
          description: JSON representation of parent folder, with members 'folderName', 'value', and 'type' which may be 'Folder' or 'Program'
          $ref: '#/components/schemas/SnippetFolder'
        id:
          type: integer
          format: int64
          description: Id of the asset
        name:
          type: string
          description: Name of the asset
        status:
          type: string
          description: Status filter for draft or approved versions
        updatedAt:
          type: string
          format: date-time
          description: Datetime the asset was most recently updated
        url:
          type: string
          description: Url of the asset in the Marketo UI
        workspace:
          type: string
          description: Name of the workspace
    CreateSnippetRequest:
      type: object
      required:
      - folder
      - name
      properties:
        description:
          type: string
          description: Description of the snippet
        folder:
          description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'
          $ref: '#/components/schemas/Folder'
        name:
          type: string
          description: Name of the snippet
    ModelResponse:
      type: object
    SnippetContentResponse:
      type: object
      required:
      - type
      properties:
        content:
          type: string
          description: Content of the snippet
        type:
          type: string
          description: Type of snippet content
    UpdateSnippetRequest:
      type: object
      properties:
        description:
          type: string
          description: Description of the snippet
        isArchive:
          type: string
          description: Archival status of the snippet
        name:
          type: string
          description: Name of the snippet
    CloneSnippetRequest:
      type: object
      required:
      - name
      - folder
      properties:
        name:
          type: string
          description: Name for the cloned snippet
        folder:
          description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'
          $ref: '#/components/schemas/Folder'
        description:
          type: string
          description: Description of the cloned snippet
    IdResponse:
      type: object
      required:
      - id
      properties:
        id:
          type: integer
          format: int32
          description: Id of the asset
    UpdateSnippetDynamicContentRequest:
      type: object
      properties:
        type:
          type: string
          description: Type of dynamic content section
          enum:
          - Typeofcontent.Either'HTML'or'Text'
        value:
          type: string
          description: Value of the dynamic content section
    ResponseOfSnippetContentResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        requestId:
          type: string
        result:
          type: array
          items:
            $ref: '#/components/schemas/SnippetContentResponse'
        success:
          type: boolean
        warnings:
          type: array
          items:
            type: string
    ResponseOfIdResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        requestId:
          type: string
        result:
          type: array
          items:
            $ref: '#/components/schemas/IdResponse'
        success:
          type: boolean
        warnings:
          type: array
          items:
            type: string