API Reference for Marketo Engage

Create Snippet

POST /rest/asset/v1/snippets.json

Creates a new snippet.

Operation ID
createSnippetUsingPOST
Permissions
Read-Write Assets
Request format
application/x-www-form-urlencoded
Returns
ResponseOfSnippetResponse

Request body

application/x-www-form-urlencoded · required · CreateSnippetRequest · 5 properties

Sent as URL-encoded form fields. Object properties are sent as JSON text in their field.

description string

Description of the snippet

folder Folder required

JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'

Model Folder

id integer (int32) required

Id of the folder

type string required

Type of folder

Values Folder Program

name string required

Name of the snippet

Responses

200 OK ResponseOfSnippetResponse
errors array of Error

Model Error

code string required

Error code of the error. See full list of error codes here

message string required

Message describing the cause of the error

requestId string
result array of SnippetResponse

Model SnippetResponse

createdAt string (date-time)

Datetime the asset was created

description string

Description of the asset

folder SnippetFolder required

JSON representation of parent folder, with members 'folderName', 'value', and 'type' which may be 'Folder' or 'Program'

Model SnippetFolder

value integer (int32) required

Id of the folder

type string required

Type of folder

Values Folder Program

folderName string required

Name of folder

id integer (int64)

Id of the asset

name string

Name of the asset

status string required

Status filter for draft or approved versions

updatedAt string (date-time)

Datetime the asset was most recently updated

url string

Url of the asset in the Marketo UI

workspace string

Name of the workspace

success boolean
warnings array of string
Generated example
{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ],
  "requestId": "123",
  "result": [
    {
      "createdAt": "2026-01-15T10:30:00Z",
      "description": "string",
      "folder": {
        "value": 123,
        "type": "Folder",
        "folderName": "Example name"
      },
      "id": 123,
      "name": "Example name",
      "status": "string",
      "updatedAt": "2026-01-15T10:30:00Z",
      "url": "https://example.com",
      "workspace": "string"
    }
  ],
  "success": true,
  "warnings": [
    "string"
  ]
}

Referenced models

Generated from swagger-asset.json. Generated examples are inferred from the schema; they are illustrative and may not be valid production payloads.

↑ ↓ to move, ↵ to open, esc to closeSee all results