API Reference for Marketo Engage

Submit Form

POST /rest/v1/leads/submitForm.json

Upserts a lead and generates a "Fill out Form" activity which is associated back to program and/or campaign.

Operation ID
SubmitFormUsingPOST
Permissions
Read-Write Lead
Request format
application/json
Returns
ResponseOfSubmitForm

Request body

application/json · required · SubmitFormRequest · 11 properties

input array of Form required

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

Model Form

leadFormFields LeadFormFields required

List of form fields. Email is required field

Model LeadFormFields

email string required

Email address used as primary key during lead upsert

visitorData VisitorData

Page visit-related data

Model VisitorData

pageURL string

Web page that hosts the form. Must be a fully formed URL

queryString string

Web page query string. Contains one or more ampersand delimited key=value pairs

leadClientIpAddress string

Client IP address. IPv4 format. Used to populate inferred fields on upserted lead record.

userAgentString string

User agent of browser hosting the form

cookie string

Munchkin cookie value used to associate new lead with anonymous activities. e.g. id:123-XYZ-456&tooken:_mch-marketo.com-1594662481190-60776

formId integer (int32) required

Id of the form

programId integer (int32)

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

Responses

200 OK ResponseOfSubmitForm
errors array of Error required

Array of errors that occurred if the request was unsuccessful

Model Error

code string required

Error code of the error. See full list of error codes here

message string required

Message describing the cause of the error

requestId string required

Id of the request made

result array of FormResponse required

Array of results for individual records in the operation, may be empty

Model FormResponse

id integer (int32) required

Id of lead

status string required

Values created updated skipped

reasons array of Reason

List of reasons why an operation did not succeed. Reasons are only present in API responses and should not be submitted

Model Reason

code string required

Integer code of the reason

message string required

Message describing the reason for the status of the operation

success boolean required

Whether the request succeeded

warnings array of Warning required

Array of warnings given for the operation

Model Warning

code integer (int32) required

Integer code of the warning

message string required

Message describing the warning

Generated example
{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ],
  "requestId": "123",
  "result": [
    {
      "id": 123,
      "status": "created",
      "reasons": [
        {
          "code": "string",
          "message": "string"
        }
      ]
    }
  ],
  "success": false,
  "warnings": [
    {
      "code": 123,
      "message": "string"
    }
  ]
}

Referenced models

Generated from swagger-mapi.json. Generated examples are inferred from the schema; they are illustrative and may not be valid production payloads.

↑ ↓ to move, ↵ to open, esc to closeSee all results