> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Marketo Engage activity feed

> Mount Marketo Engage activity feed on your app.

Follow the [REST mounting guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Pass the receiver below as `receivers.provider`, bound with `providerEndpoint`
from `@bijectionhq/app-rest` and a sealed Marketo bearer access token with activity read permission.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export const remote = providerEndpoint(
  "marketo.activities.token-feed",
  "https://YOUR_INSTANCE.mktorest.com",
  "/rest/v1/activities.json",
  auth,
  data,
);
```

Bind the mount under the same `data` label as the receiver. As the mount's operator, call `source.initialize`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "marketo.activities.token-feed", limit: 25, selection: "INITIAL_PAGING_TOKEN", collection: "6,9" } }
```

Use the REST host of the Marketo instance. Obtain an initial paging token for the desired start time through Marketo's Get Paging Token API. Use that navigation token as `selection` and set one to ten comma-separated activity type IDs in `collection`. The Marketo GUID keys activity events. Each page carries the next provider token, including terminal pages, and follows `moreResult` while work is ready. Provider errors hold the committed position. Install a new mount with a freshly issued token if the provider can no longer resume the retained one. The feed does not infer deletions or backfill events outside the provider's retention window.

Up to 100 records and 36 KiB per response. The bundled parser is required. Rows and their next position
commit together. Review failures through `source.health`.

[Provider API reference](https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/rest/lead-database/activities)

## Lead profiles

Bind `marketo.leads.by-id` to `/rest/v1/leads.json` on the same
instance and protected `data` label. Seal a Marketo bearer token
with Read-Only Lead access. Supply one to 50 comma-separated exact lead
IDs in `selection`, `limit` at least the number of IDs, and optionally
`fields` for API fields to return. Each poll requires the whole response
within 36 KiB. Keys are lead IDs. Missing leads leave earlier observations
in place.

[Marketo lead API](https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/rest/lead-database/leads)

## Writes

Follow the [native write guide](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes)
and bind the same protected label on the REST mount and its writers.
Seal a bearer token with Read-Write Lead or Read-Write Activity on the instance REST origin.

* Bind a writer with `providerWriter` for `marketo.leads.upsert`.
  Use action `upsert`. Pass the lead email address as `externalId` and the lead fields as `payload`. The mutation records Marketo’s lead ID for a created or updated item.
* Bind a writer with `providerWriter` for `marketo.activities.create`.
  Use action `create`. Pass `leadId`, `activityTypeId`, `activityDate` and `primaryAttributeValue`. The activity type must already be approved. The receipt keeps the returned Marketo GUID.

Each command binds its key to the exact inputs and admits up to 24 KiB.
The mount retains receipt evidence and dispatches once. An unresolved
dispatch stays unknown.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.