Skip to content

Get Leads By List Id

GET /rest/v1/list/{listId}/leads.json

Permissions Read-Only LeadRead-Write Lead

Build a request and mock the response

Method: GET
Path: /rest/v1/list/{listId}/leads.json
Tag: Static Lists
Operation ID: getLeadsByListIdUsingGET

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

Formats

  • Request: application/json
  • Response: application/json

Request

Path parameters

Name Type Required Description Constraints
listId integer (int32) Yes Id of the static list to retrieve records from

Query parameters

Name Type Required Description Constraints
fields array No Comma-separated list of lead fields to return for each record. If unset will return email, updatedAt, createdAt, lastName, firstName and id collection format: multi
batchSize integer (int32) No The batch size to return. The max and default value is 300.
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.

Example request

GET {{base_url}}/rest/v1/list/{{listId}}/leads.json?fields={{fields}}&batchSize={{batchSize}}&nextPageToken={{nextPageToken}}
Accept: application/json

Responses

200 — OK

Schema: model: ResponseOfLeadByListId

Generated example

{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ],
  "nextPageToken": "example-token",
  "requestId": "123",
  "result": [
    {
      "id": 123,
      "membership": {
        "acquiredBy": false,
        "isExhausted": false,
        "membershipDate": "string",
        "nurtureCadence": "string",
        "progressionStatus": "string",
        "reachedSuccess": false,
        "stream": "string"
      },
      "reason": {
        "code": "string",
        "message": "string"
      },
      "status": "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.