← all adapters

marketo-style

simulates Marketo Engage REST API 1.0

restadapter v0.1.021 routes

verification

VMVM tier — no SDK suite yet· surface 21 · not implemented 5 · differs 3

use it

# add to stunt.yaml
services:
  marketo:
    adapter: embedded:marketo-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Marketo Engage REST API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Marketo Engage REST API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Marketo Engage REST API 1.0 surface — the data is fake, the behavior is real.

backing stores

leadscampaignsprogramsfoldersactivitiestokens

api surface (21)

generated from the adapter manifest — exactly what boots, nothing more

21 routes
GET/identity/oauth/token
POST/rest/v1/leads.json
GET/rest/v1/leads
POST/rest/v1/leads
GET/rest/v1/leads/describe
GET/rest/v1/leads/{id}
GET/rest/v1/leads/{id}.json
POST/rest/v1/campaigns/{id}/trigger
GET/rest/v1/campaigns
GET/rest/v1/programs
GET/rest/v1/folders
GET/rest/v1/activities/pagingtoken
GET/rest/v1/activities
POST/bulk/v1/leads/export/create
POST/bulk/v1/leads/export/create.json
GET/bulk/v1/leads/export/{exportId}/status
GET/bulk/v1/leads/export/{exportId}/status.json
GET/bulk/v1/leads/export/{exportId}/file
GET/bulk/v1/leads/export/{exportId}/file.json
POST/bulk/v1/leads/export/{exportId}/cancel
POST/bulk/v1/leads/export/{exportId}/cancel.json

VM-verified behaviors (6)

  • only client_credentials mints a token
  • an invalid token gets the 403 success=false envelope
  • create assigns ids through the input array
  • get by id round-trips the fields
  • createOrUpdate dedupes by email in place
  • batchSize/nextPageToken paging walks leads without overlap

Not implemented (5)

  • No bulk lead import (enqueue, batch status, failures, warnings)
  • No bulk activity extract (POST /bulk/v1/activities/export/*)
  • No custom objects API (/rest/v1/customobjects)
  • No asset APIs (emails, forms, landing pages, files) under /rest/asset/v1
  • No lead delete (POST /rest/v1/leads/delete.json) or campaign schedule

Differs from the real API (3)

  • Export job timing fixed: Processing after ~1s, Completed after ~3s
  • Signed completion webhook (X-Stunt-Signature, fixed secret) is a simulator extension
  • Daily quota 602 modeled but threshold set to 100k so tests are unaffected
want more of the Marketo Engage REST API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.