Marketo Engage Rest API (1.0)

Download OpenAPI specification:Download

Marketo Engage Rest API

Activities

Activities Controller

Get Lead Activities

Returns a list of activities from after a datetime given by the nextPageToken parameter. Also allows for filtering by lead static list membership, or by a list of up to 30 lead ids. Required Permissions: Read-Only Activity, Read-Write Activity

Request
query Parameters
nextPageToken
required
string

Token representation of a datetime returned by the Get Paging Token endpoint. This endpoint will return activities after this datetime

activityTypeIds
required
Array of integers <int32>

Comma-separated list of activity type ids. These can be retrieved with the Get Activity Types API.

assetIds
Array of integers <int32>

Id of the primary asset for an activity. This is based on the primary asset id of a given activity type. Should only be used when a single activity type is set

listId
integer <int32>

Id of a static list. If set, will only return activities of members of this static list.

leadIds
Array of integers <int64>

Comma-separated list of lead ids. If set, will only return activities of the leads with these ids. Allows up to 30 entries.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

Responses
200

OK

get/rest/v1/activities.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Deleted Leads

Returns a list of leads deleted after a given datetime. Deletions greater than 14 days old may be pruned. Required Permissions: Read-Only Activity, Read-Write Activity

Request
query Parameters
nextPageToken
required
string

Token representation of a datetime returned by the Get Paging Token endpoint. This endpoint will return activities after this datetime

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

Responses
200

OK

get/rest/v1/activities/deletedleads.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Add Custom Activities

Allows insertion of custom activities associated to given lead records. Requires provisioning of custom activity types to utilize. Required Permissions: Read-Write Activity

Request
Request Body schema: application/json
required

customActivityRequest

required
Array of objects (CustomActivity)

List of custom activities to insert

Responses
200

OK

post/rest/v1/activities/external.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Custom Activity Type

Creates a new custom activity type draft in the target instance. Required Permissions: Read-Write Activity Metadata

Request
Request Body schema: application/json
required

customActivityTypeRequest

apiName
required
string
description
string
filterName
required
string

Human-readable name of the associated filter

name
required
string

Human-readable display name of the activity type

required
object (CustomActivityTypeAttribute)
triggerName
required
string

Human-readable name of the associated trigger

Responses
200

OK

post/rest/v1/activities/external/type.json
Request samples
application/json
{
  • "apiName": "string",
  • "description": "string",
  • "filterName": "string",
  • "name": "string",
  • "primaryAttribute": {
    },
  • "triggerName": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Custom Activity Type

Updates the target custom activity type. All changes are applied to the draft version of the type. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Request Body schema: application/json
required

customActivityTypeRequest

apiName
required
string
description
string
filterName
required
string

Human-readable name of the associated filter

name
required
string

Human-readable display name of the activity type

required
object (CustomActivityTypeAttribute)
triggerName
required
string

Human-readable name of the associated trigger

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}.json
Request samples
application/json
{
  • "apiName": "string",
  • "description": "string",
  • "filterName": "string",
  • "name": "string",
  • "primaryAttribute": {
    },
  • "triggerName": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Approve Custom Activity Type

Approves the current draft of the type, and makes it the live version. This will delete the current live version of the type. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/approve.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Custom Activity Type Attributes

Adds activity attributes to the target type. These are added to the draft version of the type. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Request Body schema: application/json
required

customActivityTypeAttributeRequest

Array of objects (CustomActivityTypeAttribute)

List of attributes to add to the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/attributes/create.json
Request samples
application/json
{
  • "attributes": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Custom Activity Type Attributes

Deletes the target attributes from the custom activity type draft. The apiName of each attribute is the primary key for the update. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Request Body schema: application/json
required

customActivityTypeAttributeRequest

Array of objects (CustomActivityTypeAttribute)

List of attributes to add to the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/attributes/delete.json
Request samples
application/json
{
  • "attributes": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Custom Activity Type Attributes

Updates the attributes of the custom activity type draft. The apiName of each attribute is the primary key for the update. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Request Body schema: application/json
required

customActivityTypeAttributeRequest

Array of objects (CustomActivityTypeAttribute)

List of attributes to add to the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/attributes/update.json
Request samples
application/json
{
  • "attributes": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Custom Activity Type

Deletes the target custom activity type. The type must first be removed from use by any assets, such as triggers or filters. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/delete.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Custom Activity Type

Returns metadata for a specific custom activity type. Required Permissions: Read-Only Activity Metadata, Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

query Parameters
draft
boolean

draft

Responses
200

OK

get/rest/v1/activities/external/type/{apiName}/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Discard Custom Activity Type Draft

Discards the current draft of the custom activity type. Required Permissions: Read-Write Activity Metadata

Request
path Parameters
apiName
required
string

API Name of the activity type

Responses
200

OK

post/rest/v1/activities/external/type/{apiName}/discardDraft.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Custom Activity Types

Returns metadata regarding custom activities provisioned in the target instance. Required Permissions: Read-Only Activity Metadata, Read-Write Activity Metadata

Responses
200

OK

get/rest/v1/activities/external/types.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Lead Changes

Returns a list of Data Value Changes and New Lead activities after a given datetime. Required Permissions: Read-Only Activity, Read-Write Activity

Request
query Parameters
nextPageToken
required
string

Token representation of a datetime returned by the Get Paging Token endpoint. This endpoint will return activities after this datetime

fields
required
Array of strings

Comma-separated list of field names to return changes for. Field names can be retrieved with the Describe Lead API.

listId
integer <int32>

Id of a static list. If set, will only return activities of members of this static list.

leadIds
Array of integers <int64>

Comma-separated list of lead ids. If set, will only return activities of the leads with these ids. Allows up to 30 entries.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

Responses
200

OK

get/rest/v1/activities/leadchanges.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Paging Token

Returns a paging token for use in retrieving activities and data value changes. Required Permissions: Read-Only Activity, Read-Write Activity

Request
query Parameters
sinceDatetime
required
string <date-time>

Earliest datetime to retrieve activities from

Responses
200

OK

get/rest/v1/activities/pagingtoken.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "success": false,
  • "warnings": [
    ]
}

Get Activity Types

Returns a list of available activity types in the target instance, along with associated metadata of each type. Required Permissions: Read-Only Activity, Read-Write Activity

Responses
200

OK

get/rest/v1/activities/types.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Bulk Export Activities

Bulk Export Activities Controller

Get Export Activity Jobs

Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Activity

Request
query Parameters
status
Array of strings

Comma separated list of statuses to filter on.

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/bulk/v1/activities/export.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Export Activity Job

Create export job for search criteria defined via "filter" parameter. Request returns the "exportId" which is passed as a parameter in subsequent calls to Bulk Export Activities endpoints. Use Enqueue Export Activity Job endpoint to queue the export job for processing. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity

Request
Request Body schema: application/json

exportActivityRequest

ColumnHeaderNames: A JSON object containing key-value pairs of field and column header names.

Example:
"columnHeaderNames":{
"primaryAttributeValueId":"Attribute ID",
"primaryAttributeValue":"Attribute Value",
"attributes":"Secondary Attributes"
}

object (ColumnHeaderNames)
fields
required
Array of strings

Array of strings containing field values. Used to reduce the number of fields contained in export file. Select one or more of: marketoGUID, leadId, activityDate, activityTypeId, campaignId, primaryAttributeValueId, primaryAttributeValue, actionResult

required
object (ExportActivityFilter)
format
string

File format to create("CSV", "TSV", "SSV"). Default is "CSV"

Responses
200

OK

post/bulk/v1/activities/export/create.json
Request samples
application/json
{
  • "columnHeaderNames": {
    },
  • "fields": [
    ],
  • "filter": {
    },
  • "format": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Cancel Export Activity Job

Cancel export job. Required Permissions: Read-Only Activity

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/activities/export/{exportId}/cancel.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Enqueue Export Activity Job

Enqueue export job. This will place export job in queue, and will start the job when computing resources become available. The export job must be in "Created" state. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/activities/export/{exportId}/enqueue.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Export Activity File

Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity

The file format is specified by calling the Create Export Activity Job endpoint. The following is an example of the default file format ("CSV"). Note that the "attributes" field is formatted as JSON.

marketoGUID,leadId,activityDate,activityTypeId,campaignId,primaryAttributeValueId,primaryAttributeValue, attributes
122323,6,2013-09-26T06:56:35+0000,12,11,6,Owyliphys Iledil,[{"name":"Source Type","value":"Web page visit"}]

Request
path Parameters
exportId
required
string

Id of export batch job.

header Parameters
Range
string

To support partial retrieval of extracted data, the HTTP header "Range" of type "bytes" may be specified. See RFC 2616 "Range Retrieval Requests" for more information. If the header is not set, the entire contents will be returned.

Responses
200

OK

get/bulk/v1/activities/export/{exportId}/file.json
Response samples
application/json
{ }

Get Export Activity Job Status

Returns status of an export job. Job status is available for 30 days after Completed or Failed status was reached. Required Permissions: Read-Only Activity

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

get/bulk/v1/activities/export/{exportId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Bulk Export Custom Objects

Bulk Export Custom Objects Controller

Get Export Custom Object Jobs

Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

query Parameters
status
Array of strings

Comma separated list of statuses to filter on.

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/export.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Export Custom Object Job

Create export job for search criteria defined via "filter" parameter. Request returns the "exportId" which is passed as a parameter in subsequent calls to Bulk Export Custom Object endpoints. Use Enqueue Export Custom Object Job endpoint to queue the export job for processing. Use Get Export Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

Request Body schema: application/json

exportCustomObjectRequest

ColumnHeaderNames: A JSON object containing key-value pairs of custom object attributes and column header names.

Example:
"columnHeaderNames":{
"attrName1":"value1",
"attrName2":"value2",
"attrName3":"value3"
}

object (ColumnHeaderNames)
fields
required
Array of strings

Comma-separated list of custom object attributes to include in the file

required
object (ExportCustomObjectFilter)
format
string

File format to create("CSV", "TSV", "SSV"). Default is "CSV"

Responses
200

OK

post/bulk/v1/customobjects/{apiName}/export/create.json
Request samples
application/json
{
  • "columnHeaderNames": {
    },
  • "fields": [
    ],
  • "filter": {
    },
  • "format": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Cancel Export Custom Object Job

Cancel export job. Required Permissions: Read-Only Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/customobjects/{apiName}/export/{exportId}/cancel.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Enqueue Export Custom Object Job

Enqueue export job. This will place export job in queue, and will start the job when computing resources become available. The export job must be in "Created" state. Use Get Export Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/customobjects/{apiName}/export/{exportId}/enqueue.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Export Custom Object File

Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object

The file format is specified by calling the Create Export Custom Object Job endpoint. The following is an example of the default file format ("CSV").

leadId,marketoGUID,itemName
11,c93f0494-bbd9-44e8-9c0e-dae9b525073f,Hoka One One Mach 4

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

exportId
required
string

Id of export batch job.

header Parameters
Range
string

To support partial retrieval of extracted data, the HTTP header "Range" of type "bytes" may be specified. See RFC 2616 "Range Retrieval Requests" for more information. If the header is not set, the entire contents will be returned.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/export/{exportId}/file.json
Response samples
application/json
{ }

Get Export Custom Object Job Status

Returns status of an export job. Job status is available for 30 days after Completed or Failed status was reached. Required Permissions: Read-Only Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the export batch job.

exportId
required
string

Id of export batch job.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/export/{exportId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Bulk Export Leads

Bulk Export Leads Controller

Get Export Lead Jobs

Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Lead

Request
query Parameters
status
Array of strings

Comma separated list of statuses to filter on.

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/bulk/v1/leads/export.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Export Lead Job

Create export job for search criteria defined via "filter" parameter. Request returns the "exportId" which is passed as a parameter in subsequent calls to Bulk Export Leads endpoints. Use Enqueue Export Lead Job endpoint to queue the export job for processing. Use Get Export Lead Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

Request
Request Body schema: application/json

exportLeadRequest

ColumnHeaderNames: A JSON object containing key-value pairs of field and column header names.

Example:
"columnHeaderNames":{
"firstName":"First Name",
"lastName":"Last Name",
"email":"Email Address"
}

object (ColumnHeaderNames)
fields
required
Array of strings

Comma-separated list of fields to include in the file

required
object (ExportLeadFilter)
format
string

File format to create("CSV", "TSV", "SSV"). Default is "CSV"

Responses
200

OK

post/bulk/v1/leads/export/create.json
Request samples
application/json
{
  • "columnHeaderNames": {
    },
  • "fields": [
    ],
  • "filter": {
    },
  • "format": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Cancel Export Lead Job

Cancel export job. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/leads/export/{exportId}/cancel.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Enqueue Export Lead Job

Enqueue export job. This will place export job in queue, and will start the job when computing resources become available. The export job must be in "Created" state. Use Get Export Lead Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/leads/export/{exportId}/enqueue.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Export Lead File

Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Lead Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

The file format is specified by calling the Create Export Lead Job endpoint. The following is an example of the default file format ("CSV").

firstName,lastName,email
Marvin,Gaye,marvin.gaye@motown.com

Request
path Parameters
exportId
required
string

Id of export batch job.

header Parameters
Range
string

To support partial retrieval of extracted data, the HTTP header "Range" of type "bytes" may be specified. See RFC 2616 "Range Retrieval Requests" for more information. If the header is not set, the entire contents will be returned.

Responses
200

OK

get/bulk/v1/leads/export/{exportId}/file.json
Response samples
application/json
{ }

Get Export Lead Job Status

Returns status of an export job. Job status is available for 30 days after Completed or Failed status was reached. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

get/bulk/v1/leads/export/{exportId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Bulk Export Program Members

Bulk Export Program Members Controller

Get Export Program Member Jobs

Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Lead

Request
query Parameters
status
Array of strings

Comma separated list of statuses to filter on.

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/bulk/v1/program/members/export.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Export Program Member Job

Create export job for search criteria defined via "filter" parameter. Request returns the "exportId" which is passed as a parameter in subsequent calls to Bulk Export Program Members endpoints. Use Enqueue Export Program Member Job endpoint to queue the export job for processing. Use Get Export Program Member Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

Request
Request Body schema: application/json

exportProgramMemberRequest

ColumnHeaderNames: A JSON object containing key-value pairs of field and column header names.

Example:
"columnHeaderNames":{
"firstName":"First Name",
"lastName":"Last Name",
"email":"Email Address"
}

object (ColumnHeaderNames)
fields
required
Array of strings

Comma-separated list of fields to include in the file

required
object (ExportProgramMemberFilter)
format
string

File format to create("CSV", "TSV", "SSV"). Default is "CSV"

Responses
200

OK

post/bulk/v1/program/members/export/create.json
Request samples
application/json
{
  • "columnHeaderNames": {
    },
  • "fields": [
    ],
  • "filter": {
    },
  • "format": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Cancel Export Program Member Job

Cancel export job. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/program/members/export/{exportId}/cancel.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Enqueue Export Program Member Job

Enqueue export job. This will place export job in queue, and will start the job when computing resources become available. The export job must be in "Created" state. Use Get Export Program Member Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

post/bulk/v1/program/members/export/{exportId}/enqueue.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Export Program Member File

Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Program Member Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Lead

The file format is specified by calling the Create Export Program Member Job endpoint. The following is an example of the default file format ("CSV").

firstName,lastName,email
Marvin,Gaye,marvin.gaye@motown.com

Request
path Parameters
exportId
required
string

Id of export batch job.

header Parameters
Range
string

To support partial retrieval of extracted data, the HTTP header "Range" of type "bytes" may be specified. See RFC 2616 "Range Retrieval Requests" for more information. If the header is not set, the entire contents will be returned.

Responses
200

OK

get/bulk/v1/program/members/export/{exportId}/file.json
Response samples
application/json
{ }

Get Export Program Member Job Status

Returns status of an export job. Job status is available for 30 days after Completed or Failed status was reached. Required Permissions: Read-Only Lead

Request
path Parameters
exportId
required
string

Id of export batch job.

Responses
200

OK

get/bulk/v1/program/members/export/{exportId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Bulk Import Custom Objects

Bulk Import Custom Objects Controller

Import Custom Objects

Imports a file containing data records into the target instance. Required Permissions: Read-Write Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the import batch job.

query Parameters
format
required
string

Import file format.

Enum: "csv" "tsv" "ssv"
Request Body schema: multipart/form-data
required
file
required
string <binary>

File containing the data records to import.

Responses
200

OK

post/bulk/v1/customobjects/{apiName}/import.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Custom Object Failures

Returns the list of failures for the import batch job. Required Permissions: Read-Write Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the import batch job.

batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/import/{batchId}/failures.json
Response samples
application/json
{ }

Get Import Custom Object Status

Returns the status of an import batch job. Required Permissions: Read-Write Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the import batch job.

batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/import/{batchId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Custom Object Warnings

Returns the list of warnings for the import batch job. Required Permissions: Read-Write Custom Object

Request
path Parameters
apiName
required
string

API Name of the custom object for the import batch job.

batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/customobjects/{apiName}/import/{batchId}/warnings.json
Response samples
application/json
{ }

Bulk Import Leads

Bulk Import Leads Controller

Import Leads

Imports a file containing data records into the target instance. Required Permissions: Read-Write Lead

Request
query Parameters
format
required
string

Import file format.

Enum: "csv" "tsv" "ssv"
lookupField
string

Field to use for deduplication. Custom fields (string, email, integer), and the following field types are supported: id, cookies, email, twitterId, facebookId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId. Default is email.
Note: You can use id for update only operations.

partitionName
string

Name of the lead partition to import to.

listId
integer <int32>

Id of the static list to import into.

Request Body schema: multipart/form-data
required
file
required
string <binary>

File containing the data records to import.

Responses
200

OK

post/bulk/v1/leads.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Lead Status

Returns the status of an import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/leads/batch/{batchId}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Lead Failures

Returns the list of failures for the import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/leads/batch/{batchId}/failures.json
Response samples
application/json
{ }

Get Import Lead Warnings

Returns the list of warnings for the import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/leads/batch/{batchId}/warnings.json
Response samples
application/json
{ }

Bulk Import Program Members

Bulk Import Program Members Controller

Import Program Members

Imports a file containing data records into the target instance. Required Permissions: Read-Write Lead

Request
path Parameters
programId
required
string

Id of the program to add members to.

query Parameters
programMemberStatus
required
string

Program member status for members being added.

format
required
string

Import file format.

Enum: "CSV" "TSV" "SSV"
Request Body schema: multipart/form-data
required
file
required
string <binary>

File containing the data records to import.

Responses
200

OK

post/bulk/v1/program/{programId}/members/import.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Program Member Failures

Returns the list of failures for the import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/program/members/import/{batchId}/failures.json
Response samples
application/json
{ }

Get Import Program Member Status

Returns the status of an import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/program/members/import/{batchId}/status.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Import Program Member Warnings

Returns the list of warnings for the import batch job. Required Permissions: Read-Write Lead

Request
path Parameters
batchId
required
integer <int32>

Id of the import batch job.

Responses
200

OK

get/bulk/v1/program/members/import/{batchId}/warnings.json
Response samples
application/json
{ }

Campaigns

Campaigns Controller

Get Campaigns

Returns a list of campaign records. Required Permissions: Read-Only Campaigns, Read-Write Campaigns

Note: This endpoint has been superceded. Use Get Smart Campaigns endpoint instead.

Request
query Parameters
id
Array of integers <int32>

Comma-separated list of campaign ids to return records for

name
Array of strings

Comma-separated list of names to filter on

programName
Array of strings

Comma-separated list of program names to filter on. If set, will filter to only campaigns which are children of the designated programs.

workspaceName
Array of strings

Comma-separated list of workspace names to filter on. If set, will only return campaigns in the given workspaces.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

isTriggerable
boolean

Set to true to return active Campaigns which have a Campaign is Requested trigger and source is Web Service API

Responses
200

OK

get/rest/v1/campaigns.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Campaign By Id

Returns the record of a campaign by its id. Required Permissions: Read-Only Campaigns, Read-Write Campaigns

Note: This endpoint has been superceded. Use Get Smart Campaign by Id endpoint instead.

Request
path Parameters
campaignId
required
integer <int32>

campaignId

Responses
200

OK

get/rest/v1/campaigns/{campaignId}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Schedule Campaign

Remotely schedules a batch campaign to run at a given time. My tokens local to the campaign's parent program can be overridden for the run to customize content. When using the "cloneToProgramName" parameter described below, this endpoint is limited to 20 calls per day. Required Permissions: Execute Campaign

Request
path Parameters
campaignId
required
integer <int32>

Id of the batch campaign to schedule.

Request Body schema: application/json

scheduleCampaignRequest

object (ScheduleCampaignData)
Responses
200

OK

post/rest/v1/campaigns/{campaignId}/schedule.json
Request samples
application/json
{
  • "input": {
    }
}
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Request Campaign

Passes a set of leads to a trigger campaign to run through the campaign's flow. The designated campaign must have a Campaign is Requested: Web Service API trigger, and must be active. My tokens local to the campaign's parent program can be overridden for the run to customize content. A maximum of 100 leads are allowed per call. Required Permissions: Execute Campaign

Request
path Parameters
campaignId
required
integer <int32>

The id of the campaign to trigger

Request Body schema: application/json

triggerCampaignRequest

required
object (TriggerCampaignData)
Responses
200

OK

post/rest/v1/campaigns/{campaignId}/trigger.json
Request samples
application/json
{
  • "input": {
    }
}
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Companies

Companies Controller

Get Companies

Retrieves company records from the destination instance based on the submitted filter. Required Permissions: Read-Only Company, Read-Write Company

Request
query Parameters
filterType
required
string

The company field to filter on. Searchable fields can be retrieved with the Describe Company call.

filterValues
required
Array of strings

Comma-separated list of values to match against

fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/companies.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Companies

Allows inserting, updating, or upserting of company records into Marketo. Required Permissions: Read-Write Company

Request
Request Body schema: application/json
required

syncCompanyRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (Company)

List of input records. Each 'Company' object contains a 'searchableField' for lookup purposes, and one or more 'fields' to create or update. Both can be retrieved using the Describe Companies endpoint

Responses
200

OK

post/rest/v1/companies.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Companies

Deletes the included list of company records from the destination instance. Required Permissions: Read-Write Company

Request
Request Body schema: application/json
required

deleteCompanyRequest

deleteBy
string

Field to delete company records by. Key may be "dedupeFields" or "idField"

Array of objects (Company)

List of company objects. Companies in the list should only contain a member matching the dedupeBy value. Each 'Company' object contains a 'searchableField' for lookup purposes which can be retrieved using the Describe Companies endpoint

Responses
200

OK

post/rest/v1/companies/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Companies

Returns metadata about companies and the fields available for interaction via the API. Required Permissions: Read-Only Company, Read-Write Company

Responses
200

OK

get/rest/v1/companies/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Company Field by Name

Retrieves metadata for single company field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of company field

Responses
200

OK

get/rest/v1/companies/schema/fields/{fieldApiName}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Company Fields

Retrieves metadata for all company fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
query Parameters
batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/companies/schema/fields.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Custom Objects

Custom Objects Controller

List Custom Objects

Returns a list of Custom Object types available in the target instance, along with id and deduplication information for each type. Required Permissions: Read-Only Custom Object, Read-Write Custom Object

Request
query Parameters
names
Array of strings

Comma-separated list of names to filter types on

Responses
200

OK

get/rest/v1/customobjects.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Custom Objects

Retrieves a list of custom objects records based on filter and set of values. There are two unique types of requests for this endpoint: one is executed normally using a GET with URL parameters, the other is by passing a JSON object in the body of a POST and specifying _method=GET in the querystring. The latter is used when dedupeFields attribute has more than one field, which is known as a "compound key". Required Permissions: Read-Only Custom Object, Read-Write Custom Object

Request
path Parameters
customObjectName
required
string

Name of custom object type to retrieve records for

query Parameters
filterType
required
string

Field to filter on. Searchable fields can be retrieved with Describe Custom Object

filterValues
required
Array of strings

Comma-separated list of field values to match against.

fields
Array of strings

Comma-separated list of fields to return for each record. If unset marketoGuid, dedupeFields, updatedAt, createdAt will be returned

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Request Body schema: application/json

Optional JSON request for retrieving custom objects with compound keys. Example:
{
"filterType":"dedupeFields",
"fields":[
"marketoGuid",
"Bedrooms",
"yearBuilt"
],
"input":[
{
"mlsNum":"1962352",
"houseOwnerId":"42645756"
},
{
"mlsNum":"3962352",
"houseOwnerId":"62645756"
}
]
}

batchSize
integer <int32>

Maximum number of records to return in the response. Max and default is 300

fields
Array of strings

List of fields to return. If not specified, will return the following fields: marketoGuid, dedupeFields, updatedAt, createdAt, filterType

filterType
string

Field to search on. Valid values are: dedupeFields, idFields, and any field defined in searchableFields attribute of Describe endpoint. Default is dedupeFields

required
Array of objects (CustomObject)

Search values when using a compound key. Each element must include each of the fields in the compound key. Compound keys are determined by the contents of "dedupeFields" in the Describe result for the object

nextPageToken
string

Paging token returned from a previous response

Responses
200

OK

get/rest/v1/customobjects/{customObjectName}.json
Request samples
application/json
{
  • "batchSize": 0,
  • "fields": [
    ],
  • "filterType": "string",
  • "input": [
    ],
  • "nextPageToken": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Custom Objects

Inserts, updates, or upserts custom object records to the target instance. Required Permissions: Read-Write Custom Object

Request
path Parameters
customObjectName
required
string

customObjectName

Request Body schema: application/json
required

syncCustomObjectRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/customobjects/{customObjectName}.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Custom Objects

Deletes a given set of custom object records. Required Permissions: Read-Write Custom Object

Request
path Parameters
customObjectName
required
string

customObjectName

Request Body schema: application/json

deleteCustomObjectRequest

deleteBy
string

Field to delete records by. Permissible values are idField or dedupeFields as indicated by the result of the corresponding describe record

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/customobjects/{customObjectName}/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Custom Objects

Returns metadata regarding a given custom object. Required Permissions: Read-Only Custom Object, Read-Write Custom Object

Request
path Parameters
customObjectName
required
string

customObjectName

Responses
200

OK

get/rest/v1/customobjects/{customObjectName}/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

List Custom Object Types

Returns a list of Custom Object Types available in the target instance, along with id, deduplication, relationship, and field information for each type. Required Permissions: Read-Only Custom Object Type, Read-Write Custom Object Type

Request
query Parameters
names
Array of strings

Comma-separated list of API names of custom object types to filter on

state
string

State of custom object type to filter on. By default, if an approved version exists, it is returned. Otherwise, the draft version is returned.

Enum: "draft" "approved" "approvedWithDraft"
Responses
200

OK

get/rest/v1/customobjects/schema.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Custom Object Type

Inserts, updates, or upserts custom object type record to the target instance. Required Permissions: Read-Write Custom Object Type

Request
Request Body schema: application/json
required

JSON object containing custom object type attributes

action
string

Type of sync operation to perform. Default is createOrUpdate.

Enum: "createOnly" "updateOnly" "createOrUpdate"
displayName
required
string

UI display-name of the custom object type

apiName
required
string

API name of the custom object type

pluralName
string

UI plural-name of the custom object type

description
string

Description of the custom object type

showInLeadDetail
boolean

Whether to show custom object type in lead detail of UI. Default is false

Responses
200

OK

post/rest/v1/customobjects/schema.json
Request samples
application/json
{
  • "action": "createOnly",
  • "displayName": "string",
  • "apiName": "string",
  • "pluralName": "string",
  • "description": "string",
  • "showInLeadDetail": true
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Approve Custom Object Type

Approves the current draft of the type, and makes it the live version. This will delete the current live version of the type. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API Name of the custom object type to approve

Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/approve.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Discard Custom Object Type Draft

Discards the current draft of the custom object type. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API Name of the custom object type draft to discard

Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/discardDraft.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Custom Object Type

Deletes the target custom object type. The type must first be removed from use by any assets, such as triggers or filters. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API Name of the custom object type to delete

Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/delete.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Custom Object Type

Returns metadata regarding a given custom object type (including relationships and fields). Required Permissions: Read-Only Custom Object Type, Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API name of custom object type to describe

query Parameters
state
string

State of custom object type to filter on. By default, if an approved version exists, it is returned. Otherwise, the draft version is returned.

Enum: "draft" "approved" "approvedWithDraft"
Responses
200

OK

get/rest/v1/customobjects/schema/{apiName}/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Add Custom Object Type Fields

Adds fields to custom object type. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API name of custom object type

Request Body schema: application/json
required

JSON object containing custom object type fields

required
Array of objects (AddCustomObjectTypeField)

List of fields to add to custom object type

Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/addField.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Custom Object Type Fields

Deletes fields from custom object type. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API name of custom object type

Request Body schema: application/json
required

JSON object containing custom object type fields

required
Array of objects (DeleteCustomObjectTypeField)

List of fields to delete from the custom object type

Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/deleteField.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Custom Object Type Field

Updates a field in custom object type. Required Permissions: Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

API name of custom object type

fieldApiName
required
string

API name of custom object type field

Request Body schema: application/json
required

JSON object containing custom object type fields

name
string

API Name of custom object field

displayName
string

UI display-name of the custom object field

dataType
string

Datatype of the custom object field

description
string

Description of the custom object field

isDedupeField
boolean

Set to true to enable field as unique identifier for deduplicating records. Default is false

object (CustomObjectTypeFieldRelatedTo)
Responses
200

OK

post/rest/v1/customobjects/schema/{apiName}/{fieldApiName}/updateField.json
Request samples
application/json
{
  • "name": "string",
  • "displayName": "string",
  • "dataType": "string",
  • "description": "string",
  • "isDedupeField": true,
  • "relatedTo": {
    }
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Custom Object Type Field Data Types

Returns a list of permissible data types that are assigned to custom object fields. Required Permissions: Read-Only Custom Object Type, Read-Write Custom Object Type

Responses
200

OK

get/rest/v1/customobjects/schema/fieldDataTypes.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Custom Object Linkable Objects

Returns a list of linkable custom objects and their fields. Required Permissions: Read-Only Custom Object Type, Read-Write Custom Object Type

Responses
200

OK

get/rest/v1/customobjects/schema/linkableObjects.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Custom Object Dependent Assets

Returns a list of dependent assets for a custom object type, including their in-instance location. Required Permissions: Read-Only Custom Object Type, Read-Write Custom Object Type

Request
path Parameters
apiName
required
string

REST API name for custom object

Responses
200

OK

get/rest/v1/customobjects/schema/{apiName}/dependentAssets.json
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Leads

Leads Controller

Get Lead by Id

Retrieves a single lead record through its Marketo id. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
leadId
required
integer <int64>

The Marketo lead id

query Parameters
fields
Array of strings

Comma separated list of field names. If omitted, the following default fields will be returned: email, updatedAt, createdAt, lastName, firstName, and id.

Responses
200

OK

get/rest/v1/lead/{leadId}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Leads by Filter Type

Returns a list of up to 300 leads based on a list of values in a particular field. Required Permissions: Read-Only Lead, Read-Write Lead

Request
query Parameters
filterType
required
string

The lead field to filter on. Any custom field (string, email, or integer types only), and any of the following fields are supported: cookies, email, facebookId, id, leadPartitionId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId, twitterId.

A comprehensive list of fields can be obtained via the Describe Lead2 endpoint.

filterValues
required
Array of strings

A comma-separated list of values to filter on in the specified fields.

fields
Array of strings

A comma-separated list of lead fields to return for each record

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/leads.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Leads

Syncs a list of leads to the target instance. Required Permissions: Read-Write Lead

Request
Request Body schema: application/json
required

syncLeadRequest

action
string

Type of sync operation to perform. Defaults to createOrUpdate if unset

Enum: "createOnly" "updateOnly" "createOrUpdate" "createDuplicate"
asyncProcessing
boolean

If set to true, the call will return immediately

required
Array of objects (Lead)

List of leads for input

lookupField
string

Field to deduplicate on. The field must be present in each lead record of the input. Defaults to email if unset

partitionName
string

Name of the partition to operate on, if applicable. Should be set whenever possible, when interacting with an instance where partitions are enabled.

Responses
200

OK

post/rest/v1/leads.json
Request samples
application/json
{
  • "action": "createOnly",
  • "asyncProcessing": false,
  • "input": [
    ],
  • "lookupField": "string",
  • "partitionName": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Leads

Delete a list of leads from the destination instance. Required Permissions: Read-Write Lead

Request
query Parameters
id
Array of integers <int64>

Parameter can be specified if the request body is empty. Multiple lead ids can be specified. e.g. id=1,2,3,2342

Request Body schema: application/json

deleteLeadRequest

required
Array of objects (LeadInputData)

List of leads for input

Responses
200

OK

post/rest/v1/leads/delete.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Lead

Returns metadata about lead objects in the target instance, including a list of all fields available for interaction via the APIs. Required Permissions: Read-Only Lead, Read-Write Lead

Note: This endpoint has been superceded. Use Describe Lead2 endpoint instead.

Responses
200

OK

get/rest/v1/leads/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Lead2

Returns list of searchable fields on lead objects in the target instance. Required Permissions: Read-Only Lead, Read-Write Lead

Responses
200

OK

get/rest/v1/leads/describe2.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Lead Field by Name

Retrieves metadata for single lead field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of lead field

Responses
200

OK

get/rest/v1/leads/schema/fields/{fieldApiName}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Lead Field

Update metadata for a lead field in the target instance. See update rules here. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of lead field

Request Body schema: application/json
required

updateLeadFieldRequest

required
Array of objects (UpdateLeadField)

Single lead field for input

Responses
200

OK

post/rest/v1/leads/schema/fields/{fieldApiName}.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Lead Fields

Retrieves metadata for all lead fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
query Parameters
batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/leads/schema/fields.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Lead Fields

Create lead fields in the target instance. Required Permissions: Read-Write Schema Custom Field

Request
Request Body schema: application/json
required

createLeadFieldRequest

required
Array of objects (CreateLeadField)

List of lead fields for input

Responses
200

OK

post/rest/v1/leads/schema/fields.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Program Member

Returns metadata about program member objects in the target instance, including a list of all fields available for interaction via the APIs. Required Permissions: Read-Only Lead, Read-Write Lead

Note: This endpoint has been superceded. Use Describe Program Member endpoint instead.

Responses
200

OK

get/rest/v1/program/members/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Lead Partitions

Returns a list of available partitions in the target instance. Required Permissions: Read-Only Lead, Read-Write Lead

Responses
200

OK

get/rest/v1/leads/partitions.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Lead Partition

Updates the lead partition for a list of leads. Required Permissions: Read-Write Lead

Request
Request Body schema: application/json
required

updateLeadPartitionRequest

required
Array of objects (UpdateLeadPartition)

List of leads for input

Responses
200

OK

post/rest/v1/leads/partitions.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Leads by Program Id

Retrieves a list of leads which are members of the designated program. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
programId
required
integer <int32>

The id of the program to retrieve from

query Parameters
fields
Array of strings

A comma-separated list of fields to be returned for each record

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/leads/programs/{programId}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Change Lead Program Status

Changes the program status of a list of leads in a target program. Only existing members of the program may have their status changed with this API. Required Permissions: Read-Write Lead

Note: This endpoint has been superceded. Use Sync Program Member Status endpoint instead.

Request
path Parameters
programId
required
integer <int32>

The id of target program

Request Body schema: application/json
required

changeLeadProgramStatusRequest

required
Array of objects (LeadLookupInputData)

List of leads for input

status
required
string

Program status of the record. Permissible values can be retrieve from the Get Channel by Name API for the designated program's channel

Responses
200

OK

post/rest/v1/leads/programs/{programId}/status.json
Request samples
application/json
{
  • "input": [
    ],
  • "status": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Push Lead to Marketo

Upserts a lead and generates a Push Lead to Marketo activity. Required Permissions: Read-Write Lead

Request
Request Body schema: application/json
required

pushLeadToMarketoRequest

Array of objects (PushLead)
lookupField
string
partitionName
string
programName
string
programStatus
string
reason
string
source
string
Responses
200

OK

post/rest/v1/leads/push.json
Request samples
application/json
{
  • "input": [
    ],
  • "lookupField": "string",
  • "partitionName": "string",
  • "programName": "string",
  • "programStatus": "string",
  • "reason": "string",
  • "source": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Submit Form

Upserts a lead and generates a "Fill out Form" activity which is associated back to program and/or campaign. Required Permissions: Read-Write Lead

Request
Request Body schema: application/json
required

submitFormRequest

required
Array of objects (Form)

Single array item that contains form fields and visitor data to use during a form submittal

formId
required
integer <int32>

Id of the form

programId
integer <int32>

Id of the program to add lead and/or program member custom fields to

Responses
200

OK

post/rest/v1/leads/submitForm.json
Request samples
application/json
{
  • "input": [
    ],
  • "formId": 0,
  • "programId": 0
}
Response samples
application/json
{
  • "errors": [
    ],
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Associate Lead

Associates a known Marketo lead record to a munchkin cookie and its associated web acitvity history. Required Permissions: Read-Write Lead

Request
path Parameters
leadId
required
integer <int64>

The id of the lead to associate

query Parameters
cookie
required
string

The cookie value to associate

Responses
200

OK

post/rest/v1/leads/{leadId}/associate.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "success": false,
  • "warnings": [
    ]
}

Merge Leads

Merges two or more known lead records into a single lead record. Required Permissions: Read-Write Lead

Request
path Parameters
leadId
required
integer <int64>

The id of the winning lead record

query Parameters
leadId
integer <int64>

The id of the losing record

leadIds
Array of integers <int64>

A comma-separated list of ids of losing records

mergeInCRM
boolean

If set, will attempt to merge the designated records in a natively-synched CRM. Only valid for instances with are natively synched to SFDC.

Responses
200

OK

post/rest/v1/leads/{leadId}/merge.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "success": false,
  • "warnings": [
    ]
}

Get Lists by Lead Id

Query static list membership for one lead. Required Permissions: Read-Only Asset

Request
path Parameters
leadId
required
integer <int64>

The Marketo lead id

query Parameters
nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

Responses
200

OK

get/rest/v1/leads/{leadId}/listMembership.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Programs by Lead Id

Query program membership for one lead. Required Permissions: Read-Only Asset

Request
path Parameters
leadId
required
integer <int64>

The Marketo lead id

query Parameters
nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

earliestUpdatedAt
string

Exclude programs prior to this date. Must be valid ISO-8601 string. See Datetime field type description.

latestUpdatedAt
string

Exclude programs after this date. Must be valid ISO-8601 string. See Datetime field type description.

filterType
string

Set to "programId" to filter a set of programs.

filterValues
Array of strings

Comma-separated list of program ids to match against

Responses
200

OK

get/rest/v1/leads/{leadId}/programMembership.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Smart Campaigns by Lead Id

Query smart campaign membership for one lead. Required Permissions: Read-Only Asset

Request
path Parameters
leadId
required
integer <int64>

The Marketo lead id

query Parameters
nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

batchSize
integer <int32>

Maximum number of records to return. Maximum and default is 300.

earliestUpdatedAt
string

Exclude smart campaigns prior to this date. Must be valid ISO-8601 string. See Datetime field type description.

latestUpdatedAt
string

Exclude smart campaigns after this date. Must be valid ISO-8601 string. See Datetime field type description.

Responses
200

OK

get/rest/v1/leads/{leadId}/smartCampaignMembership.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Named Account Lists

Named Account Lists Controller

Get Named Account List Members

Retrieves the named accounts which are members of the given list. Required Permissions: Read-Only Named Account, Read-Write Named Account

Request
path Parameters
id
required
string

Id of the named account list

query Parameters
fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/namedAccountList/{id}/namedAccounts.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Add Named Account List Members

Adds named account records to a named account list. Required Permissions: Read-Write Named Account

Request
path Parameters
id
required
string

Id of target named account list

Request Body schema: application/json
required

addNamedAccountListMemberRequest

required
Array of objects (NamedAccount)

List of input records

Responses
200

OK

post/rest/v1/namedAccountList/{id}/namedAccounts.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Remove Named Account List Members

Removes named account members from a named account list. Required Permissions: Read-Write Named Account

Request
path Parameters
id
required
string

Id of target named account list

Request Body schema: application/json
required

removeNamedAccountListMemberRequest

required
Array of objects (NamedAccount)

List of input records

Responses
200

OK

post/rest/v1/namedAccountList/{id}/namedAccounts/remove.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Named Account Lists

Retrieves a list of named account list records based on the filter type and values given. Required Permissions: Read-Only Named Account List, Read-Write Named Account List

Request
query Parameters
filterType
required
string

The named account list field to filter on ("dedupeFields" or "idFields").

filterValues
required
Array of strings

Comma-separated list of values to match against

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/namedAccountLists.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Named Account Lists

Creates and/or updates named account list records. Required Permissions: Read-Write Named Account List

Request
Request Body schema: application/json
required

syncNamedAccountListRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (NamedAccountList)

List of input records

Responses
200

OK

post/rest/v1/namedAccountLists.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Named Account Lists

Delete named account lists by dedupe fields, or by id field. Required Permissions: Read-Write Named Account List

Request
Request Body schema: application/json
required

deleteNamedAccountListRequest

deleteBy
string

Key to use for deletion of the record

required
Array of objects (NamedAccountList)

List of input records

Responses
200

OK

post/rest/v1/namedAccountLists/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Named Accounts

Named Accounts Controller

Get Named Account Field by Name

Retrieves metadata for single named account field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of named account field

Responses
200

OK

get/rest/v1/namedaccounts/schema/fields/{fieldApiName}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Named Account Fields

Retrieves metadata for all named account fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
query Parameters
batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/namedaccounts/schema/fields.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get NamedAccounts

Retrieves namedaccount records from the destination instance based on the submitted filter. Required Permissions: Read-Only Named Account, Read-Write Named Account

Request
query Parameters
filterType
required
string

NamedAccounts field to filter on. Can be any searchable fields

filterValues
required
Array of strings

A comma-separated list of values to match against

fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/namedaccounts.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync NamedAccounts

Allows inserts, updates, or upserts of namedaccounts to the target instance. Required Permissions: Read-Write Named Account

Request
Request Body schema: application/json
required

syncAccountRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (NamedAccount)

List of input records

Responses
200

OK

post/rest/v1/namedaccounts.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete NamedAccounts

Deletes a list of namedaccount records from the target instance. Input records should have only one member, based on the value of 'dedupeBy'. Required Permissions: Read-Write Named Account

Request
Request Body schema: application/json
required

deleteAccountRequest

deleteBy
string

Key to use for deletion of the record

required
Array of objects (NamedAccount)

List of input records

Responses
200

OK

post/rest/v1/namedaccounts/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe NamedAccounts

Returns metadata about namedaccounts and the fields available for interaction via the API. Required Permissions: Read-Only Named Account, Read-Write Named Account

Responses
200

OK

get/rest/v1/namedaccounts/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Opportunities

Opportunities Controller

Get Opportunity Field by Name

Retrieves metadata for single opportunity field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of opportunity field

Responses
200

OK

get/rest/v1/opportunities/schema/fields/{fieldApiName}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Opportunity Fields

Retrieves metadata for all opportunity fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
query Parameters
batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/opportunities/schema/fields.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Opportunities

Returns a list of opportunities based on a filter and set of values. Required Permissions: Read-Only Opportunity, Read-Write Named Opportunity

Request
query Parameters
filterType
required
string

Opportunities field to filter on

filterValues
required
Array of strings

Comma-separated list of values to match against

fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

Maximum number of records to return in the response. Max and default is 300

nextPageToken
string

Paging token returned from a previous response

Request Body schema: application/json

customObjectLookupRequest

batchSize
integer <int32>

Maximum number of records to return in the response. Max and default is 300

fields
Array of strings

List of fields to return. If not specified, will return the following fields: marketoGuid, dedupeFields, updatedAt, createdAt, filterType

filterType
string

Field to search on. Valid values are: dedupeFields, idFields, and any field defined in searchableFields attribute of Describe endpoint. Default is dedupeFields

required
Array of objects (CustomObject)

Search values when using a compound key. Each element must include each of the fields in the compound key. Compound keys are determined by the contents of "dedupeFields" in the Describe result for the object

nextPageToken
string

Paging token returned from a previous response

Responses
200

OK

get/rest/v1/opportunities.json
Request samples
application/json
{
  • "batchSize": 0,
  • "fields": [
    ],
  • "filterType": "string",
  • "input": [
    ],
  • "nextPageToken": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Opportunities

Allows inserting, updating, or upserting of opportunity records into the target instance. Required Permissions: Read-Write Named Opportunity

Request
Request Body schema: application/json
required

syncCustomObjectRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/opportunities.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Opportunities

Deletes a list of opportunity records from the target instance. Input records should only have one member, based on the value of 'dedupeBy'. Required Permissions: Read-Write Named Opportunity

Request
Request Body schema: application/json

deleteCustomObjectRequest

deleteBy
string

Field to delete records by. Permissible values are idField or dedupeFields as indicated by the result of the corresponding describe record

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/opportunities/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Opportunity

Returns object and field metadata for Opportunity type records in the target instance. Required Permissions: Read-Only Opportunity, Read-Write Named Opportunity

Responses
200

OK

get/rest/v1/opportunities/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Opportunity Roles

Returns a list of opportunity roles based on a filter and set of values. Required Permissions: Read-Only Opportunity, Read-Write Named Opportunity

Request
query Parameters
filterType
required
string

The role field to filter on. Searchable fields can be retrieved with the Describe Opportunity call.

filterValues
required
Array of strings

Comma-separated list of field values to return records for

fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

Maximum number of records to return in the response. Max and default is 300

nextPageToken
string

Paging token returned from a previous response

Request Body schema: application/json

Optional JSON request for retrieving opportunity roles with compound keys

batchSize
integer <int32>

Maximum number of records to return in the response. Max and default is 300

fields
Array of strings

List of fields to return. If not specified, will return the following fields: marketoGuid, dedupeFields, updatedAt, createdAt, filterType

filterType
string

Field to search on. Valid values are: dedupeFields, idFields, and any field defined in searchableFields attribute of Describe endpoint. Default is dedupeFields

required
Array of objects (CustomObject)

Search values when using a compound key. Each element must include each of the fields in the compound key. Compound keys are determined by the contents of "dedupeFields" in the Describe result for the object

nextPageToken
string

Paging token returned from a previous response

Responses
200

OK

get/rest/v1/opportunities/roles.json
Request samples
application/json
{
  • "batchSize": 0,
  • "fields": [
    ],
  • "filterType": "string",
  • "input": [
    ],
  • "nextPageToken": "string"
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Opportunity Roles

Allows inserts, updates and upserts of Opportunity Role records in the target instance. Required Permissions: Read-Write Named Opportunity

Request
Request Body schema: application/json
required

syncCustomObjectRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/opportunities/roles.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Opportunity Roles

Deletes a list of opportunities from the target instance. Required Permissions: Read-Write Named Opportunity

Request
Request Body schema: application/json

deleteCustomObjectRequest

deleteBy
string

Field to delete records by. Permissible values are idField or dedupeFields as indicated by the result of the corresponding describe record

required
Array of objects (CustomObject)

List of input records

Responses
200

OK

post/rest/v1/opportunities/roles/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Opportunity Role

Returns object and field metadata for Opportunity Roles in the target instance. Required Permissions: Read-Only Opportunity, Read-Write Named Opportunity

Responses
200

OK

get/rest/v1/opportunities/roles/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Program Members

Program Members Controller

Get Program Member Field by Name

Retrieves metadata for single program member field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of program member field

Responses
200

OK

get/rest/v1/programs/members/schema/fields/{fieldApiName}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Update Program Member Field

Update metadata for a program member field in the target instance. See update rules here. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
path Parameters
fieldApiName
required
string

The API name of program member field

Request Body schema: application/json
required

updateLeadFieldRequest

required
Array of objects (UpdateLeadField)

Single lead field for input

Responses
200

OK

post/rest/v1/programs/members/schema/fields/{fieldApiName}.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Program Member Fields

Retrieves metadata for all program member fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field

Request
query Parameters
batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/programs/members/schema/fields.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Create Program Member Fields

Create program member fields in the target instance. Required Permissions: Read-Write Schema Custom Field

Request
Request Body schema: application/json
required

createLeadFieldRequest

required
Array of objects (CreateLeadField)

List of lead fields for input

Responses
200

OK

post/rest/v1/programs/members/schema/fields.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Program Member Status

Changes the program member status of a list of leads in a target program. If member is not part of the program, member is added to the program. Required Permissions: Read-Write Lead

Request
path Parameters
programId
required
integer <int64>

The id of target program.

Request Body schema: application/json
required

syncProgramMemberStatusRequest

statusName
required
string

Program member status

required
Array of objects (ProgramMemberStatus)

List of input records

Responses
200

OK

post/rest/v1/programs/{programId}/members/status.json
Request samples
application/json
{
  • "statusName": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Program Members

Returns a list of up to 300 program members on a list of values in a particular field. If you specify a filterType that is a custom field, the custom field’s dataType must be either “string” or “integer”. If you specify a filterType other than “leadId”, a maximum of 100,000 program member records can be processed by the request. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
programId
required
integer <int64>

The id of target program.

query Parameters
filterType
required
string

The program member field to filter on. Any custom field (string or integer types only), "updatedAt", or any searchable field. Searchable fields can be obtained via the Describe Program Member endpoint.

filterValues
required
Array of strings

A comma-separated list of values to filter on in the specified fields.

startAt
string

When using filterType=updatedAt, the start of date range filter (ISO 8601-format)

endAt
string

When using filterType=updatedAt, the end of date range filter (ISO 8601-format)

fields
Array of strings

A comma-separated list of lead fields to return for each record.

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/programs/{programId}/members.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync Program Member Data

Changes the program member data of a list of leads in a target program. Only existing members of the program may have their data changed with this API. Required Permissions: Read-Write Lead

Request
path Parameters
programId
required
integer <int64>

The id of target program.

Request Body schema: application/json
required

syncProgramMemberDataRequest

required
Array of objects (ProgramMemberData)

List of input records

Responses
200

OK

post/rest/v1/programs/{programId}/members.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete Program Members

Delete a list of members from the destination instance. Required Permissions: Read-Write Lead

Request
path Parameters
programId
required
integer <int64>

The id of target program.

Request Body schema: application/json
required

deleteProgramMemberRequest

required
Array of objects (ProgramMemberDelete)

List of input records

Responses
200

OK

post/rest/v1/programs/{programId}/members/delete.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe Program Member

Returns metadata about program member objects in the target instance, including a list of all fields available for interaction via the APIs. Required Permissions: Read-Only Lead, Read-Write Lead

Responses
200

OK

get/rest/v1/programs/members/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sales Persons

Sales Persons Controller

Get SalesPersons

Retrieves salesperson records from the destination instance based on the submitted filter. Required Permissions: Read-Only Sales Person, Read-Write Sales Person

Request
query Parameters
filterType
required
string

The sales person field to filter on. Searchable fields can be retrieved with the Describe Sales Person call.

filterValues
required
Array of strings

Comma seperated list of search values.

fields
Array of strings

Comma-separated list of fields to include in the response

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/salespersons.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Sync SalesPersons

Allows inserts, updates, or upserts of salespersons to the target instance. Required Permissions: Read-Write Sales Person

Request
Request Body schema: application/json
required

syncSalesPersonRequest

action
string

Type of sync operation to perform

Enum: "createOnly" "updateOnly" "createOrUpdate"
dedupeBy
string

Field to deduplicate on. If the value in the field for a given record is not unique, an error will be returned for the individual record.

required
Array of objects (SalesPerson)

List of input records

Responses
200

OK

post/rest/v1/salespersons.json
Request samples
application/json
{
  • "action": "createOnly",
  • "dedupeBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Delete SalesPersons

Deletes a list of salesperson records from the target instance. Input records should have only one member, based on the value of 'dedupeBy'. Required Permissions: Read-Write Sales Person

Request
Request Body schema: application/json
required

deleteSalesPersonRequest

deleteBy
string

Key to use for deletion of the record

required
Array of objects (SalesPerson)

List of input records

Responses
200

OK

post/rest/v1/salespersons/delete.json
Request samples
application/json
{
  • "deleteBy": "string",
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Describe SalesPersons

Returns metadata about salespersons and the fields available for interaction via the API. Required Permissions: Read-Only Sales Person, Read-Write Sales Person

Responses
200

OK

get/rest/v1/salespersons/describe.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Static Lists

Static Lists Controller

Get Leads By List Id

Retrieves person records which are members of the given static list. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of the static list to retrieve records from

query Parameters
fields
Array of strings

Comma-separated list of lead fields to return for each record. If unset will return email, updatedAt, createdAt, lastName, firstName and id

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/list/{listId}/leads.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Lists

Returns a set of static list records based on given filter parameters. Required Permissions: Read-Only Lead, Read-Write Lead

Request
query Parameters
id
Array of integers <int32>

Comma-separated list of static list ids to return

name
Array of strings

Comma-separated list of static list names to return

programName
Array of strings

Comma-separated list of program names. If set will return all static lists that are children of the given programs

workspaceName
Array of strings

Comma-separated list of workspace names. If set will return all static lists that are children of the given workspaces

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/lists.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get List by Id

Returns a list record by its id. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of the static list to retrieve records from

Responses
200

OK

get/rest/v1/lists/{listId}.json
Response samples
application/json
{
  • "errors": [
    ],
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Leads By List Id

Retrieves person records which are members of the given static list. Required Permissions: Read-Only Lead, Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of the static list to retrieve records from

query Parameters
fields
Array of strings

Comma-separated list of lead fields to return for each record. If unset will return email, updatedAt, createdAt, lastName, firstName and id

batchSize
integer <int32>

The batch size to return. The max and default value is 300.

nextPageToken
string

A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info.

Responses
200

OK

get/rest/v1/lists/{listId}/leads.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Add to List

Adds a given set of person records to a target static list. There is a limit of 300 lead ids per request. Required Permissions: Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of target list

query Parameters
id
Array of integers <int32>

Comma-separated list of lead ids to add to the list

Request Body schema: application/json

Optional JSON request body for submitting leads

required
Array of objects (LeadInputData)

List of leads for input

Responses
200

OK

post/rest/v1/lists/{listId}/leads.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Remove from List

Removes a given set of person records from a target static list. Required Permissions: Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of static list to remove leads from

query Parameters
id
required
Array of integers <int32>

id

Request Body schema: application/json
required

listOperationRequest

required
Array of objects (LeadInputData)

List of leads for input

Responses
200

OK

delete/rest/v1/lists/{listId}/leads.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Member of List

Checks if leads are members of a given static list. Required Permissions: Read-Write Lead

Request
path Parameters
listId
required
integer <int32>

Id of the static list to check against

query Parameters
id
Array of integers <int32>

Comma-separated list of lead ids to check

Request Body schema: application/json

Optional JSON request body

required
Array of objects (LeadInputData)

List of leads for input

Responses
200

OK

get/rest/v1/lists/{listId}/leads/ismember.json
Request samples
application/json
{
  • "input": [
    ]
}
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Usage

Stats Controller

Get Daily Errors

Retrieves a count of each error type they have encountered in the current day. Required Permissions: None

Responses
200

OK

get/rest/v1/stats/errors.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Weekly Errors

Returns a count of each error type they have encountered in the past 7 days. Required Permissions: None

Responses
200

OK

get/rest/v1/stats/errors/last7days.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Daily Usage

Returns the number of calls consumed for the day. Required Permissions: None

Responses
200

OK

get/rest/v1/stats/usage.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}

Get Weekly Usage

Returns the number of calls consumed in the past 7 days. Required Permissions: None

Responses
200

OK

get/rest/v1/stats/usage/last7days.json
Response samples
application/json
{
  • "errors": [
    ],
  • "moreResult": false,
  • "nextPageToken": "string",
  • "requestId": "string",
  • "result": [
    ],
  • "success": false,
  • "warnings": [
    ]
}