Get Smart Campaigns by Lead Id¶
GET /rest/v1/leads/{leadId}/smartCampaignMembership.json
Method: GET
Path: /rest/v1/leads/{leadId}/smartCampaignMembership.json
Tag: Leads
Operation ID: getSmartCampaignMembershipUsingGET
Query smart campaign membership for one lead. Required Permissions: Read-Only Asset
Formats¶
- Request:
application/json - Response:
application/json
Request¶
Path parameters¶
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
leadId |
integer (int64) | Yes | The Marketo lead id |
Query parameters¶
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
nextPageToken |
string | No | 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) | No | Maximum number of records to return. Maximum and default is 300. | |
earliestUpdatedAt |
string | No | Exclude smart campaigns prior to this date. Must be valid ISO-8601 string. See Datetime field type description. | |
latestUpdatedAt |
string | No | Exclude smart campaigns after this date. Must be valid ISO-8601 string. See Datetime field type description. |
Example request¶
GET {{base_url}}/rest/v1/leads/{{leadId}}/smartCampaignMembership.json?nextPageToken={{nextPageToken}}&batchSize={{batchSize}}&earliestUpdatedAt={{earliestUpdatedAt}}&latestUpdatedAt={{latestUpdatedAt}}
Accept: application/json
Responses¶
200 — OK¶
Schema: model: ResponseOfSmartCampaigns
Generated example¶
{
"errors": [
{
"code": "string",
"message": "string"
}
],
"moreResult": false,
"nextPageToken": "example-token",
"requestId": "123",
"result": [
{
"createdAt": "string",
"smartCampaignId": 123,
"updatedAt": "string"
}
],
"success": false,
"warnings": [
{
"code": 123,
"message": "string"
}
]
}
Referenced models¶
Source¶
Generated from swagger-mapi.json.
Generated examples are inferred from the schema. They are illustrative and may not be valid production payloads.