Marketo Snippets API

Snippet Controller

GitHub OpenAPI
Business capability
Content Marketing Management BC-400.70

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /rest/asset/v1/snippet/{id}.json Get a snippet by ID · Get Snippet by Id #
Ask an LLM
“Can I fetch a snippet's metadata by its ID?”
“Is it possible to read a snippet's draft instead of the approved version?”
Tell an agent
Get snippet {id}.
Show the {status} version of snippet {id}.
POST /rest/asset/v1/snippet/{id}.json Update a snippet's metadata · Update Snippet Metadata #
Ask an LLM
“Can I rename or archive an existing snippet?”
“How do I change a snippet's description?”
Tell an agent
Rename snippet {id} to {name}.
Set snippet {id} archived status to {isArchive}.
POST /rest/asset/v1/snippet/{id}/approveDraft.json Approve a snippet's draft · Approve Snippet Draft #
Ask an LLM
“How do I approve a snippet draft so it can be used?”
“What happens to a snippet when its draft is approved?”
Tell an agent
Approve the draft of snippet {id}.
Publish snippet {id} by approving its current draft.
POST /rest/asset/v1/snippet/{id}/clone.json Clone a snippet · Clone Snippet #
Ask an LLM
“Can I make a copy of a snippet in a different folder?”
“How do I duplicate a snippet with a new name?”
Tell an agent
Clone snippet {id} as {name} in folder {folder}.
Copy snippet {id} into folder {folder} named {name}.
GET /rest/asset/v1/snippet/{id}/content.json Get a snippet's content · Get Snippet Content #
Ask an LLM
“Can I read the actual HTML content of a snippet?”
“Which version of a snippet's content do I get?”
Tell an agent
Get the content of snippet {id}.
Show the {status} content of snippet {id}.
POST /rest/asset/v1/snippet/{id}/content.json Update a snippet's content · Update Snippet Content #
Ask an LLM
“How do I change the HTML inside a snippet?”
“Can I set the content type when updating a snippet?”
Tell an agent
Set snippet {id} content to {content} of type {type}.
Replace the content of snippet {id} with {content} as {type}.
POST /rest/asset/v1/snippet/{id}/delete.json Delete a snippet · Delete Snippet #
Ask an LLM
“How do I delete a snippet that is still in use?”
“Can I remove a snippet from the instance?”
Tell an agent destructive · confirm first
Delete snippet {id}.
Remove snippet {id} from the instance.
POST /rest/asset/v1/snippet/{id}/discardDraft.json Discard a snippet's draft · Discard Snippet Draft #
Ask an LLM
“Can I throw away a snippet draft without approving it?”
“What happens to a snippet when its draft is discarded?”
Tell an agent destructive · confirm first
Discard the draft of snippet {id}.
Throw away the current draft of snippet {id}.
GET /rest/asset/v1/snippet/{id}/dynamicContent.json List a snippet's dynamic content sections · Get Dynamic Content #
Ask an LLM
“Which dynamic content sections are set up on a snippet?”
“Can I see the dynamic content of a snippet's draft?”
Tell an agent
List the dynamic content sections of snippet {id}.
Show dynamic content for snippet {id} in {status} status.
POST /rest/asset/v1/snippet/{id}/dynamicContent/{segmentId}.json Update a snippet's dynamic content · Update Snippet Dynamic Content #
Ask an LLM
“How do I change the value of a dynamic content section on a snippet?”
“Can I set the type of a dynamic content section?”
Tell an agent
Set dynamic content section {segmentId} of snippet {id} to {value}.
Change the value of snippet {id}'s dynamic content {segmentId} to {value}.
POST /rest/asset/v1/snippet/{id}/unapprove.json Unapprove a snippet · Unapprove Snippet #
Ask an LLM
“How do I revert an approved snippet back to a draft?”
“Can I unapprove a snippet that is still in use?”
Tell an agent destructive · confirm first
Unapprove snippet {id}.
Revert approved snippet {id} to a draft-only version.
GET /rest/asset/v1/snippets.json List snippets · Get Snippets #
Ask an LLM
“What snippets do I have access to?”
“Can I list only the approved snippets?”
Tell an agent
List my snippets.
List {status} snippets, {maxReturn} at a time.
POST /rest/asset/v1/snippets.json Create a snippet · Create Snippet #
Ask an LLM
“How do I create a new snippet in a folder?”
“What permissions do I need to create a snippet?”
Tell an agent
Create a snippet named {name} in folder {folder}.
Create snippet {name} in folder {folder} described as {description}.

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:marketo-snippets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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 List Fragments 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:
    SnippetContentResponse:
      type: object
      required:
      - type
      properties:
        content:
          type: string
          description: Content of the snippet
        type:
          type: string
          description: Type of snippet content
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    ModelResponse:
      type: object
    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