Marketo Leads API

Leads Controller

Operations 22

GET /rest/v1/lead/{leadId}.json Get Lead by Id #
GET /rest/v1/leads.json Get Leads by Filter Type #
POST /rest/v1/leads.json Sync Leads #
POST /rest/v1/leads/delete.json Delete Leads #
GET /rest/v1/leads/describe.json Describe Lead #
GET /rest/v1/leads/describe2.json Describe Lead2 #
GET /rest/v1/leads/schema/fields/{fieldApiName}.json Get Lead Field by Name #
POST /rest/v1/leads/schema/fields/{fieldApiName}.json Update Lead Field #
GET /rest/v1/leads/schema/fields.json Get Lead Fields #
POST /rest/v1/leads/schema/fields.json Create Lead Fields #
GET /rest/v1/program/members/describe.json Describe Program Member #
GET /rest/v1/leads/partitions.json Get Lead Partitions #
POST /rest/v1/leads/partitions.json Update Lead Partition #
GET /rest/v1/leads/programs/{programId}.json Get Leads by Program Id #
POST /rest/v1/leads/programs/{programId}/status.json Change Lead Program Status #
POST /rest/v1/leads/push.json Push Lead to Marketo #
POST /rest/v1/leads/submitForm.json Submit Form #
POST /rest/v1/leads/{leadId}/associate.json Associate Lead #
POST /rest/v1/leads/{leadId}/merge.json Merge Leads #
GET /rest/v1/leads/{leadId}/listMembership.json Get Lists by Lead Id #
GET /rest/v1/leads/{leadId}/programMembership.json Get Programs by Lead Id #
GET /rest/v1/leads/{leadId}/smartCampaignMembership.json Get Smart Campaigns by Lead Id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/marketo-leads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

marketo-leads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Marketo Engage Rest API
  version: '1.0'
  title: Marketo Engage Rest Leads API
  termsOfService: https://www.adobe.com/legal.html
  contact:
    name: Adobe Developer Relations
    url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/home
    email: ''
  license:
    name: API License Agreement
    url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/api-license
servers:
- url: https://localhost:8080/
tags:
- name: Leads
  description: Leads Controller
paths:
  /rest/v1/lead/{leadId}.json:
    get:
      tags:
      - Leads
      summary: Get Lead by Id
      description: 'Retrieves a single lead record through its Marketo id. Required Permissions: Read-Only Lead, Read-Write Lead'
      operationId: getLeadByIdUsingGET
      parameters:
      - name: leadId
        in: path
        description: The Marketo lead id
        required: true
        schema:
          type: integer
          format: int64
      - name: fields
        in: query
        description: 'Comma separated list of field names. If omitted, the following default fields will be returned: email, updatedAt, createdAt, lastName, firstName, and id.'
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
  /rest/v1/leads.json:
    get:
      tags:
      - Leads
      summary: Get Leads by Filter Type
      description: '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'
      operationId: getLeadsByFilterUsingGET
      parameters:
      - name: filterType
        in: query
        description: '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.<br><br>A comprehensive list of fields can be obtained via the <a href="http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Leads/describeUsingGET_6">Describe Lead2</a> endpoint.'
        required: true
        schema:
          type: string
      - name: filterValues
        in: query
        description: A comma-separated list of values to filter on in the specified fields.
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: fields
        in: query
        description: A comma-separated list of lead fields to return for each record
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: batchSize
        in: query
        description: The batch size to return. The max and default value is 300.
        required: false
        schema:
          type: integer
          format: int32
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
    post:
      tags:
      - Leads
      summary: Sync Leads
      description: 'Syncs a list of leads to the target instance. Required Permissions: Read-Write Lead'
      operationId: syncLeadUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SyncLeadRequest'
        description: syncLeadRequest
        required: true
  /rest/v1/leads/delete.json:
    post:
      tags:
      - Leads
      summary: Delete Leads
      description: 'Delete a list of leads from the destination instance. Required Permissions: Read-Write Lead'
      operationId: deleteLeadsUsingPOST
      parameters:
      - name: id
        in: query
        description: Parameter can be specified if the request body is empty. Multiple lead ids can be specified. e.g. id=1,2,3,2342
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteLeadRequest'
        description: deleteLeadRequest
  /rest/v1/leads/describe.json:
    get:
      tags:
      - Leads
      summary: Describe Lead
      description: '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<br><br><b>Note: This endpoint has been superseded.</b>  Use <a href="https://developer.adobe.com/marketo-apis/api/mapi/#operation/describeUsingGET_6">Describe Lead2</a> endpoint instead.'
      operationId: describeUsingGET_2
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLeadAttribute'
  /rest/v1/leads/describe2.json:
    get:
      tags:
      - Leads
      summary: Describe Lead2
      description: 'Returns list of searchable fields on lead objects in the target instance. Required Permissions: Read-Only Lead, Read-Write Lead'
      operationId: describeUsingGET_6
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLeadAttribute2'
  /rest/v1/leads/schema/fields/{fieldApiName}.json:
    get:
      tags:
      - Leads
      summary: Get Lead Field by Name
      description: 'Retrieves metadata for single lead field. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field'
      operationId: getLeadFieldByNameUsingGET
      parameters:
      - name: fieldApiName
        in: path
        description: The API name of lead field
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLeadField'
    post:
      tags:
      - Leads
      summary: Update Lead Field
      description: 'Update metadata for a lead field in the target instance. See update rules <a href="https://developers.marketo.com/rest-api/lead-database/leads/#update_field">here</a>. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field'
      operationId: updateLeadFieldUsingPOST
      parameters:
      - name: fieldApiName
        in: path
        description: The API name of lead field
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfUpdateLeadField'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLeadFieldRequest'
        description: updateLeadFieldRequest
        required: true
  /rest/v1/leads/schema/fields.json:
    get:
      tags:
      - Leads
      summary: Get Lead Fields
      description: 'Retrieves metadata for all lead fields in the target instance. Required Permissions: Read-Write Schema Standard Field, Read-Write Schema Custom Field'
      operationId: getLeadFieldsUsingGET
      parameters:
      - name: batchSize
        in: query
        description: The batch size to return. The max and default value is 300.
        required: false
        schema:
          type: integer
          format: int32
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLeadField'
    post:
      tags:
      - Leads
      summary: Create Lead Fields
      description: 'Create lead fields in the target instance. Required Permissions: Read-Write Schema Custom Field'
      operationId: createLeadFieldUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfCreateLeadField'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLeadFieldRequest'
        description: createLeadFieldRequest
        required: true
  /rest/v1/program/members/describe.json:
    get:
      tags:
      - Leads
      summary: Describe Program Member
      description: '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<br><br><b>Note: This endpoint has been superseded.</b>  Use <a href="https://developer.adobe.com/marketo-apis/api/mapi/#operation/describeProgramMemberUsingGET2">Describe Program Member</a> endpoint instead.'
      operationId: describeProgramMemberUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfProgramMemberAttributes'
  /rest/v1/leads/partitions.json:
    get:
      tags:
      - Leads
      summary: Get Lead Partitions
      description: 'Returns a list of available partitions in the target instance. Required Permissions: Read-Only Lead, Read-Write Lead'
      operationId: getLeadPartitionsUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLeadPartition'
    post:
      tags:
      - Leads
      summary: Update Lead Partition
      description: 'Updates the lead partition for a list of leads. Required Permissions: Read-Write Lead'
      operationId: updatePartitionsUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLeadPartitionRequest'
        description: updateLeadPartitionRequest
        required: true
  /rest/v1/leads/programs/{programId}.json:
    get:
      tags:
      - Leads
      summary: Get Leads by Program Id
      description: 'Retrieves a list of leads which are members of the designated program. Required Permissions: Read-Only Lead, Read-Write Lead'
      operationId: getLeadsByProgramIdUsingGET
      parameters:
      - name: programId
        in: path
        description: The id of the program to retrieve from
        required: true
        schema:
          type: integer
          format: int32
      - name: fields
        in: query
        description: A comma-separated list of fields to be returned for each record
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: batchSize
        in: query
        description: The batch size to return. The max and default value is 300.
        required: false
        schema:
          type: integer
          format: int32
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLead'
  /rest/v1/leads/programs/{programId}/status.json:
    post:
      tags:
      - Leads
      summary: Change Lead Program Status
      description: '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<br><br><b>Note: This endpoint has been superseded.</b>  Use <a href="https://developer.adobe.com/marketo-apis/api/mapi/#operation/syncProgramMemberStatusUsingPOST">Sync Program Member Status</a> endpoint instead.'
      operationId: changeLeadProgramStatusUsingPOST
      parameters:
      - name: programId
        in: path
        description: The id of target program
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfChangeLeadProgramStatusOutputData'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeLeadProgramStatusRequest'
        description: changeLeadProgramStatusRequest
        required: true
  /rest/v1/leads/push.json:
    post:
      tags:
      - Leads
      summary: Push Lead to Marketo
      description: 'Upserts a lead and generates a Push Lead to Marketo activity. Required Permissions: Read-Write Lead'
      operationId: pushToMarketoUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfPushLeadToMarketo'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushLeadToMarketoRequest'
        description: pushLeadToMarketoRequest
        required: true
  /rest/v1/leads/submitForm.json:
    post:
      tags:
      - Leads
      summary: Submit Form
      description: 'Upserts a lead and generates a "Fill out Form" activity which is associated back to program and/or campaign. Required Permissions: Read-Write Lead'
      operationId: SubmitFormUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSubmitForm'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitFormRequest'
        description: submitFormRequest
        required: true
  /rest/v1/leads/{leadId}/associate.json:
    post:
      tags:
      - Leads
      summary: Associate Lead
      description: 'Associates a known Marketo lead record to a munchkin cookie and its associated web activity history. Required Permissions: Read-Write Lead'
      operationId: associateLeadUsingPOST
      parameters:
      - name: leadId
        in: path
        description: The id of the lead to associate
        required: true
        schema:
          type: integer
          format: int64
      - name: cookie
        in: query
        description: The cookie value to associate
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWithoutResult'
  /rest/v1/leads/{leadId}/merge.json:
    post:
      tags:
      - Leads
      summary: Merge Leads
      description: 'Merges two or more known lead records into a single lead record. Required Permissions: Read-Write Lead'
      operationId: mergeLeadsUsingPOST
      parameters:
      - name: leadId
        in: path
        description: The id of the winning lead record
        required: true
        schema:
          type: integer
          format: int64
      - name: leadId
        in: query
        description: The id of the losing record
        required: false
        schema:
          type: integer
          format: int64
      - name: leadIds
        in: query
        description: A comma-separated list of ids of losing records
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: mergeInCRM
        in: query
        description: If set, will attempt to merge the designated records in a natively-synched CRM. Only valid for instances with are natively synched to SFDC.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWithoutResult'
  /rest/v1/leads/{leadId}/listMembership.json:
    get:
      tags:
      - Leads
      summary: Get Lists by Lead Id
      description: 'Query static list membership for one lead. Required Permissions: Read-Only Asset'
      operationId: getListMembershipUsingGET
      parameters:
      - name: leadId
        in: path
        description: The Marketo lead id
        required: true
        schema:
          type: integer
          format: int64
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      - name: batchSize
        in: query
        description: Maximum number of records to return. Maximum and default is 300.
        required: false
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfLists'
  /rest/v1/leads/{leadId}/programMembership.json:
    get:
      tags:
      - Leads
      summary: Get Programs by Lead Id
      description: 'Query program membership for one lead. Required Permissions: Read-Only Asset'
      operationId: getProgramMembershipUsingGET
      parameters:
      - name: leadId
        in: path
        description: The Marketo lead id
        required: true
        schema:
          type: integer
          format: int64
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      - name: batchSize
        in: query
        description: Maximum number of records to return. Maximum and default is 300.
        required: false
        schema:
          type: integer
          format: int32
      - name: earliestUpdatedAt
        in: query
        description: Exclude programs prior to this date. Must be valid ISO-8601 string. See <a href="http://developers.marketo.com/rest-api/lead-database/fields/field-types/">Datetime</a> field type description.
        required: false
        schema:
          type: string
      - name: latestUpdatedAt
        in: query
        description: Exclude programs after this date. Must be valid ISO-8601 string. See <a href="http://developers.marketo.com/rest-api/lead-database/fields/field-types/">Datetime</a> field type description.
        required: false
        schema:
          type: string
      - name: filterType
        in: query
        description: Set to "programId" to filter a set of programs.
        required: false
        schema:
          type: string
      - name: filterValues
        in: query
        description: Comma-separated list of program ids to match against
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfPrograms'
  /rest/v1/leads/{leadId}/smartCampaignMembership.json:
    get:
      tags:
      - Leads
      summary: Get Smart Campaigns by Lead Id
      description: 'Query smart campaign membership for one lead. Required Permissions: Read-Only Asset'
      operationId: getSmartCampaignMembershipUsingGET
      parameters:
      - name: leadId
        in: path
        description: The Marketo lead id
        required: true
        schema:
          type: integer
          format: int64
      - name: nextPageToken
        in: query
        description: 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.
        required: false
        schema:
          type: string
      - name: batchSize
        in: query
        description: Maximum number of records to return. Maximum and default is 300.
        required: false
        schema:
          type: integer
          format: int32
      - name: earliestUpdatedAt
        in: query
        description: Exclude smart campaigns prior to this date. Must be valid ISO-8601 string. See <a href="http://developers.marketo.com/rest-api/lead-database/fields/field-types/">Datetime</a> field type description.
        required: false
        schema:
          type: string
      - name: latestUpdatedAt
        in: query
        description: Exclude smart campaigns after this date. Must be valid ISO-8601 string. See <a href="http://developers.marketo.com/rest-api/lead-database/fields/field-types/">Datetime</a> field type description.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOfSmartCampaigns'
components:
  schemas:
    ResponseWithoutResult:
      type: object
      required:
      - requestId
      - success
      properties:
        errors:
          type: array
          description: Array of errors that occurred if the request was unsuccessful
          items:
            $ref: '#/components/schemas/Error'
        nextPageToken:
          type: string
          description: Paging token returned from a previous response
        requestId:
          type: string
          description: Id of the request made
        success:
          type: boolean
          example: false
          description: Whether the request succeeded
        warnings:
          type: array
          description: Array of warnings given for the operation
          items:
            $ref: '#/components/schemas/Warning'
    ResponseOfLeadAttribute:
      type: object
      required:
      - errors
      - requestId
      - result
      - success
      - warnings
      properties:
        errors:
          type: array
          description: Array of errors that occurred if the request was unsuccessful
          items:
            $ref: '#/components/schemas/Error'
        moreResult:
          type: boolean
          example: false
          description: Boolean indicating if there are more results in subsequent pages
        nextPageToken:
          type: string
          description: Paging token given if the result set exceeded the allowed batch size
        requestId:
          type: string
          description: Id of the request made
        result:
          type: array
          description: Array of results for individual records in the operation, may be empty
          items:
            $ref: '#/components/schemas/LeadAttribute'
        success:
          type: boolean
          example: false
          description: Whether the request succeeded
        warnings:
          type: array
          description: Array of warnings given for the operation
          items:
            $ref: '#/components/schemas/Warning'
    Lead:
      type: object
      properties:
        id:
          type: integer
          format: int32
          description: Unique integer id of a lead record
        membership:
          description: Membership data for the parent program. Only returned via Get Leads By Program Id
          $ref: '#/components/schemas/ProgramMembership'
        reason:
          description: Reason object describing why an operation did not succeed for a record
          $ref: '#/components/schemas/Reason'
        status:
          type: string
          description: Status of the operation performed on the record
      description: Lead record. Always contains id, but may have any number of other fields, depending on the fields available in the target instance.
    ResponseOfLeadAttribute2:
      type: object
      required:
      - errors
      - requestId
      - result
      - success
      - warnings
      properties:
        errors:
          type: array
          description: Array of errors that occurred if the request was unsuccessful
          items:
            $ref: '#/components/schemas/Error'
        moreResult:
          type: boolean
          example: false
          description: Boolean indicating if there are more results in subsequent pages
        nextPageToken:
          type: string
          description: Paging token given if the result set exceeded the allowed batch size
        requestId:
          type: string
          description: Id of the request made
        result:
          type: array
          description: Array of results for individual records in the operation, may be empty
          items:
            $ref: '#/components/schemas/LeadAttribute2'
        success:
          type: boolean
          example: false
          description: Whether the request succeeded
        warnings:
          type: array
          description: Array of warnings given for the operation
          items:
            $ref: '#/components/schemas/Warning'
    LeadMapAttribute:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: Name of the attribute
        readOnly:
          type: boolean
          example: false
          description: Whether the attribute is read only
    ResponseOfProgramMemberAttributes:
      type: object
      required:
      - errors
      - requestId
      - result
      - success
      - warnings
      properties:
        errors:
          type: array
          description: Array of errors that occurred if the request was unsuccessful
          items:
            $ref: '#/components/schemas/Error'
        moreResult:
          type: boolean
          example: false
          description: Boolean indicating if there are more results in subsequent pages
        nextPageToken:
          type: string
          description: Paging token given if the result set exceeded the allowed batch size
        requestId:
          type: string
          description: Id of the request made
        result:
          type: array
          description: Array of results for individual records in the operation, may be empty
          items:
            $ref: '#/components/schemas/ProgramMemberAttribute'
        success:
          type: boolean
          example: false
          description: Whether the request succeeded
        warnings:
          type: array
          description: Array of warnings given for the operation
          items:
            $ref: '#/components/schemas/Warning'
    LeadAttribute:
      type: object
      required:
      - dataType
      - displayName
      - id
      properties:
        dataType:
          type: string
          description: Datatype of the field
        displayName:
          type: string
          description: UI display-name of the field
        id:
          type: integer
          format: int32
          description: Unique integer id of the field
        length:
          type: integer
          format: int32
          description: Max length of the field. Only applicable to text, string, and text area.
        rest:
          description: Description of REST API usage attributes
          $ref: '#/components/schemas/LeadMapAttribute'
        soap:
          description: Description of SOAP API usage attributes
          $ref: '#/components/schemas/LeadMapAttribute'
    LeadFormFields:
      type: object
      required:
      - email
      properties:
        email:
          type: string
          description: Email address used as primary key during lead upsert
      description: Form fields. Always contains email, but may have any number of other fields depending on the fields available in the form.
    ProgramMemberAttribute:
      type: object
      required:
      - fields
      properties:
        name:
          type: string
          description: '"API Program Member"'
        fields:
          type: array
          description: Description of searchable fields
          items:
            $ref: '#/components/schemas/LeadAttribute2Fields'
    LeadAttribute2Fields:
      type: object
      required:
      - name
      - displayName
      - dataType
      - updateable
      - crmManaged
      properties:
        name:
          type: string
          description: REST API name of field
        displayName:
          type: string
          description: Display name of field (friendly name)
        dataType:
          type: string
          description: Data type of field
        length:
          type: integer
          description: Length of field
        updateable:
          type: boolean
          description: Is field updateable
        crmManaged:
          type: boolean
          description: Is field managed by CRM
    CreateLeadFieldRequest:
      type: object
      required:
      - input
      properties:
        input:
          type: array
          description: List of lead fields for input
          items:
            $ref: '#/components/schemas/CreateLeadField'
    Reason:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Integer code of the reason
        message:
          type: string
          description: Message describing the reason for the status of the operation
    ResponseOfSmartCampaigns:
      type: object
      required:
      - errors
      - requestId
      - result
      - success
      - warnings
      properties:
        errors:
          type: array
          description: Array of errors that occurred if the request was unsuccessful
          items:
            $ref: '#/components/schemas/Error'
        moreResult:
          type: boolean
          example: false
          description: Boolean indicating if there are more results in subsequent pages
        nextPageToken:
          type: string
          description: Paging token given if the result set exceeded the allowed batch size
        requestId:
          type: string
          description: Id of the request made
        result:
          type: array
          description: Array of results for individual records in the operation, may be empty
      

# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/marketo/refs/heads/main/openapi/marketo-leads-api-openapi.yml