Knowledgebase

Sort by:
Issue The Get Lead Activities REST API is not returning any activities even though t he lead referenced definitely has multiple activities of the type being called. REQUEST: https://[munchkinID].mktorest.com/rest/v1/activities.json?access_token=x&leadIds=123&nextPageToken=ABC&activityTypeIds=46 RESPONSE: { "requestId": "xyz123", "success": true, "nextPageToken": "ABC", "moreResult": true }     Solution The Get Lead Activity REST API are reliant on timestamps for their nextPageToken. Each Get Lead Activity call will go through 300 activities of ALL types from the timestamp placed on the nextPageToken. This is supported by the article http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Activities/getLeadActivitiesUsingGET "By default, the endpoints mentioned in this section will return 300 activity items at a time.  If the moreResult attribute is true, this means that more results are available. Continue to call the endpoint until the moreResult attribute returns false, which means that there are no more results available." Based on that, the reason why the API call does not return any activities is that it does not find any activities of type 46 in the 300 activities it checks from the timestamp placed on the nextPageToken So when making a Get Lead Activity call for a specific activity type, ensure that nextPageToken is as close as to the timestamp of the specific activities    
View full article
Issue After you have created an API User with the correct access for making REST API calls to your Marketo instance, you still receive a response with Error 603 Access Denied even when making API calls using an up-to-date access token that you manually created. Solution Issue Resolution The most likely resolution is that you have Web Service IP Restrictions enabled on your instance. Go to Admin > Web Services Click the Edit button next to the IP Restrictions box If IP Restrictions are turned on and there are no IP addresses listed, all calls to the Marketo REST API endpoint will fail. If IP Restrictions are turned on and the IP making the API call is not listed, add it to the list and save. You can also set up wildcard IP addresses here to cover a range of IP addresses. You can learn more about whitelisting IP addresses in Marketo in the article " Create a Whitelist for IP-Based API Access ". If you have confirmed that IP Restrictions are NOT enabled and have also gone through our API User documentation to ensure the API User is set up correctly but  your calls are still failing as Access Denied, please create a support case.        
View full article
Issue Does the email address assigned to the API user need to be an email address maintained by an actual person? https://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User Solution The email address assigned to an API user does not need to be an existing email address or an actual person. It is used as an identifier for the API user. Generally, customers name the API user according to the integration the API user is being used for (e.g. integrationuser@company.com ). This is useful for tracking where API calls are coming from when there are multiple integrations configured with Marketo via the API
View full article
Issue Calls made to the REST API return response code 611 "System Error".   Solution Submit a Customer Support ticket with the following information   The full body of the REST API call including the endpoint being called The full body of the REST API response The date and time that the call was made Customer Support will work to diagnose the root cause of the error and the reason a more identifiable error code is not being returned instead.        
View full article
Issue Does Marketo have an SLA for REST API? Solution No, Marketo does not have an SLA for REST API. Our REST API Responses time out after 30 seconds. Unless written within the subscription contract, there is not a commitment for Marketo to provide an SLA for REST API Responses. As mentioned in our API License document: http://developers.marketo.com/api-license/ in section 6 B: "B. No Support. Unless otherwise agreed to in writing, Marketo shall not be responsible for providing any support, maintenance, or other services (or level of service) to You or a user of the Software Application for the Marketo APIs."    
View full article
Issue How to use the REST API to check for deleted leads. Solution You would need to use the specific endpoint : http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getDeletedLead s This will pull a list of leads deleted within a specific timeframe.  Deletions older than 30 days may be pruned.    
View full article
Issue Description When a lead is created through an API call, the Reason and Source attributes say "Web Service API" with no further detail. Issue Resolution As described in the doc here, https://docs.marketo.com/display/DOCS/Understanding+System+Managed+Fields, "Source" and "Reason" fields are managed by Marketo: 1. Web Service API for Original Source Type means Person was discovered by a web service API. 2. For Registration Source Type, it states that Person was created via SOAP/REST API When a lead is created via API, no additional "Source" or "Reason" is provided to Marketo. A possible workaround is to create a custom field and populate it as needed through the API.
View full article
Issue Description You need to revert a data value change for a field on multiple leads. Issue Resolution There is no way through the UI to "undo" a data value change (unless it was a boolean field, in which case there are only two possible values.) You can certainly use a Smart List to identify whose values have changed, but there no way to go back to the old value (unless it's stored elsewhere in another field or through another data store, along with the API). However, you can use the API to extract the data value change activity from the activity log, which would include the old and new values, extract the original values, then use the API to rewrite the old values back to the lead record. http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getLeadChangesU… Is this article helpful ? YesNo
View full article
Issue Description REST API call, Get Lead Activities , is returning 603 error   Issue Resolution Error 603 refers to 'access denied' where authentication is successful but the user doesn’t have sufficient permission to call this API. Additional permissions may need to be assigned to the user role. http://developers.marketo.com/rest-api/error-codes/   Go to Admin > Users and Roles Select API User and identify what role it is assigned to (e.g. API role) Go to Roles and check the permissions assigned to the API role Check to see if the API role does not have 'Read-Only Activity' or 'Read-Write Activity' permission In order to make a Get Lead Activities REST API call with the API user, the API role of the user must be modified to have permissions to  'Read-Only Activity' or 'Read-Write Activity'. If you use Workspaces and Partitions, make sure the API User has the necessary access. Is this article helpful ? YesNo
View full article
Issue Description The Get Lead Activities REST API is not returning any activities even though t he lead referenced definitely has multiple activities of the type being called.   REQUEST: https://[munchkinID].mktorest.com/rest/v1/activities.json?access_token=x&leadIds=123&nextPageToken=ABC&activityTypeIds=46   RESPONSE: { "requestId": "xyz123", "success": true, "nextPageToken": "ABC", "moreResult": true }   Issue Resolution The Get Lead Activity REST API are reliant on timestamps for their nextPageToken. Each Get Lead Activity call will go through 300 activities of ALL types from the timestamp placed on the nextPageToken. This is supported by the article http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Activities/getLeadActivitiesUsingGET   "By default, the endpoints mentioned in this section will return 300 activity items at a time.  If the moreResult attribute is true, this means that more results are available. Continue to call the endpoint until the moreResult attribute returns false, which means that there are no more results available."   Based on that, the reason why the API call does not return any activities is that it does not find any activities of type 46 in the 300 activities it checks from the timestamp placed on the nextPageToken   So when making a Get Lead Activity call for a specific activity type, ensure that nextPageToken is as close as to the timestamp of the specific activities Is this article helpful ? YesNo
View full article
Included in this article Note: This post will be updated to reflect changes made to activity records returned by the API due to migration to new infrastructure. Overview With the rollout of Marketo’s next-generation Activity Service beginning in May 2017, we will be unable to enforce the uniqueness or presence of the integer “id” field in activities, data value changes, or lead deletion records returned by Marketo’s APIs.  This change will begin rolling out to all subscriptions over the remaining first half of 2017. To avoid service disruptions for integrations which retrieve activity records, the id field should be treated as optional.  Cutover of this change will begin to affect subscriptions with the September (Q3) 2017 release. This change will affect the following endpoints: REST API Get Lead Activities​ Get Lead Changes​ Get Deleted Leads​ Add Custom Activities​ SOAP API getLeadActivity​ getLeadChanges​ The affected SOAP types are ActivityRecord and LeadChangeRecord. Examples The following examples show record types which will be affected.  In both examples, the effected field is called “id.” Example REST Field: id ​ Example SOAP Field: id ​ FAQs Do I need to update my WSDL version if I'm using SOAP integration? Yes. The marketoGUID field will only be returned in activities when using the WSDL version 3.1 or later.  The new URI will follow this pattern: https:// {munchkinId}.mktoapi.com/soap/mktows/3_1  It may also be obtained through the Admin->Web Services menu in your subscription When can I expect to see each change? Beginning with our Q1 Minor Release on April 7th, activity records retrieved via Marketo’s SOAP or REST APIs will include a new field called “marketoGUID”.  The value of this field will match the value of the “id” field, but will be a string type field.  Some time after the Q2 release beginning May 17th 2017, the “id” field will stop being returned as part of these records, and the value of marketoGUID will become a 128-bit string. What do I need to do? If you are responsible for code that deals with Marketo activities, you should determine whether your code relies on the presence or uniqueness of “id” field for Marketo activities, and then remove that requirement.  In an upcoming release, an additional string field called “marketoGUID” will be added.  “marketoGUID” should be considered the unique ID for retrieved activities when it becomes available.  If you are not, you should consult with your team and relay this message to the appropriate stakeholders. Who will this change affect? This change should only affect client and partner integrations which retrieve activity records from Marketo, and only if the integrations rely on either the presence and/or type of the “id” field in the response, or rely on the uniqueness of the field.  After the rollout of Orion AS, and the disabling of activity writes to MySQL, the “id” field will no longer be available and will be supplanted by a unique string id field. Check out our documentation on the Marketo Developers Site here: https://developers.marketo.com/blog/important-change-activity-records-marketo-apis/
View full article
Note: Please ensure that you have access to an experienced Web developer. Marketo Technical Support is not set up to assist with troubleshooting code. The listOperation SOAP API call allows for the ability to interact with static lists (My Lists) in the Lead Database. The supported operations are adding a lead to list (ADDTOLIST), checking if a lead is a member of the list (ISMEMBEROFLIST), and removing a lead from a list (REMOVEFROMLIST) Note, there is no operation to create a new list (or delete) via the SOAP API. The list must be created beforehand in the Lead Database. In the examples, the list is named "Static List". Example 1 - Request: Adding multiple leads into the list <soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt = "http://www.marketo.com/mktows/">     <soapenv:Header>         <mkt:AuthenticationHeader>          <mktowsUserId>[User Id]</mktowsUserId>          <requestSignature>[Signature]</requestSignature>          <requestTimestamp>[yyyy-mm-ddThh:mm:ss-00:00]</requestTimestamp>         </mkt:AuthenticationHeader>     </soapenv:Header>     <soapenv:Body>         <mkt:paramsListOperation>             <listOperation>ADDTOLIST</listOperation>             <listKey>                 <keyType>MKTOLISTNAME</keyType>                 <keyValue>Static List</keyValue>             </listKey>             <listMemberList>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>213</keyValue>                 </leadKey>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>215</keyValue>                 </leadKey>             </listMemberList>         </mkt:paramsListOperation>     </soapenv:Body> </soapenv:Envelope> Example 1 - Response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/">    <SOAP-ENV:Body>       <ns1:successListOperation>          <result>             <success>true</success>             <statusList xsi:nil="true"/>          </result>       </ns1:successListOperation>    </SOAP-ENV:Body> </SOAP-ENV:Envelope> Example 2 - Request: Check to see if leads are a part of list. One lead (Lead ID #213) is and the other (Lead ID #70) is not  <soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt = "http://www.marketo.com/mktows/">     <soapenv:Header>         <mkt:AuthenticationHeader>          <mktowsUserId>[User Id]</mktowsUserId>          <requestSignature>[Signature]</requestSignature>          <requestTimestamp>[yyyy-mm-ddThh:mm:ss-00:00]</requestTimestamp>         </mkt:AuthenticationHeader>     </soapenv:Header>     <soapenv:Body>         <mkt:paramsListOperation>             <listOperation>ISMEMBEROFLIST</listOperation>             <listKey>                 <keyType>MKTOLISTNAME</keyType>                 <keyValue>Static List</keyValue>             </listKey>             <listMemberList>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>213</keyValue>                 </leadKey>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>70</keyValue>                 </leadKey>             </listMemberList>         </mkt:paramsListOperation>     </soapenv:Body> </soapenv:Envelope> Example 2 - Response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.marketo.com/mktows/">    <SOAP-ENV:Body>       <ns1:successListOperation>          <result>             <success>false</success>             <statusList>                <leadStatus>                   <leadKey>                      <keyType>IDNUM</keyType>                      <keyValue>213</keyValue>                   </leadKey>                   <status>true</status>                </leadStatus>                <leadStatus>                   <leadKey>                      <keyType>IDNUM</keyType>                      <keyValue>70</keyValue>                   </leadKey>                   <status>false</status>                </leadStatus>             </statusList>          </result>       </ns1:successListOperation>    </SOAP-ENV:Body> </SOAP-ENV:Envelope> Example 3 - Request: Similar to Example 2, but all leads are valid  <soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt = "http://www.marketo.com/mktows/">     <soapenv:Header>         <mkt:AuthenticationHeader>          <mktowsUserId>[User Id]</mktowsUserId>          <requestSignature>[Signature]</requestSignature>          <requestTimestamp>[yyyy-mm-ddThh:mm:ss-00:00]</requestTimestamp>         </mkt:AuthenticationHeader>     </soapenv:Header>     <soapenv:Body>         <mkt:paramsListOperation>             <listOperation>ISMEMBEROFLIST</listOperation>             <listKey>                 <keyType>MKTOLISTNAME</keyType>                 <keyValue>Static List</keyValue>             </listKey>             <listMemberList>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>213</keyValue>                 </leadKey>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>215</keyValue>                 </leadKey>             </listMemberList>         </mkt:paramsListOperation>     </soapenv:Body> </soapenv:Envelope> Example 3 - Response:  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/">    <SOAP-ENV:Body>       <ns1:successListOperation>          <result>             <success>true</success>             <statusList xsi:nil="true"/>          </result>       </ns1:successListOperation>    </SOAP-ENV:Body> </SOAP-ENV:Envelope> Example 4 - Request: Remove leads from the list. One lead (Lead ID #213) is a member of the list, the other (Lead ID #70) is not  <soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt = "http://www.marketo.com/mktows/">     <soapenv:Header>         <mkt:AuthenticationHeader>          <mktowsUserId>[User Id]</mktowsUserId>          <requestSignature>[Signature]</requestSignature>          <requestTimestamp>[yyyy-mm-ddThh:mm:ss-00:00]</requestTimestamp>         </mkt:AuthenticationHeader>     </soapenv:Header>     <soapenv:Body>         <mkt:paramsListOperation>             <listOperation>REMOVEFROMLIST</listOperation>             <listKey>                 <keyType>MKTOLISTNAME</keyType>                 <keyValue>Static List</keyValue>             </listKey>             <listMemberList>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>213</keyValue>                 </leadKey>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>70</keyValue>                 </leadKey>             </listMemberList>         </mkt:paramsListOperation>     </soapenv:Body> </soapenv:Envelope> Request 4 - Response:  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.marketo.com/mktows/">    <SOAP-ENV:Body>       <ns1:successListOperation>          <result>             <success>false</success>             <statusList>                <leadStatus>                   <leadKey>                      <keyType>IDNUM</keyType>                      <keyValue>213</keyValue>                   </leadKey>                   <status>true</status>                </leadStatus>                <leadStatus>                   <leadKey>                      <keyType>IDNUM</keyType>                      <keyValue>70</keyValue>                   </leadKey>                   <status>false</status>                </leadStatus>             </statusList>          </result>       </ns1:successListOperation>    </SOAP-ENV:Body> </SOAP-ENV:Envelope> Example 5 - Request: Similar to Example 4, but all leads are valid  <soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt = "http://www.marketo.com/mktows/">     <soapenv:Header>         <mkt:AuthenticationHeader>          <mktowsUserId>[User Id]</mktowsUserId>          <requestSignature>[Signature]</requestSignature>          <requestTimestamp>[yyyy-mm-ddThh:mm:ss-00:00]</requestTimestamp>         </mkt:AuthenticationHeader>     </soapenv:Header>     <soapenv:Body>         <mkt:paramsListOperation>             <listOperation>REMOVEFROMLIST</listOperation>             <listKey>                 <keyType>MKTOLISTNAME</keyType>                 <keyValue>Static List</keyValue>             </listKey>             <listMemberList>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>213</keyValue>                 </leadKey>                 <leadKey>                     <keyType>IDNUM</keyType>                     <keyValue>215</keyValue>                 </leadKey>             </listMemberList>         </mkt:paramsListOperation>     </soapenv:Body> </soapenv:Envelope> Example 5 - Response:  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/">    <SOAP-ENV:Body>       <ns1:successListOperation>          <result>             <success>true</success>             <statusList xsi:nil="true"/>          </result>       </ns1:successListOperation>    </SOAP-ENV:Body> </SOAP-ENV:Envelope> Related Learning Resources Marketo SOAP API Reference
View full article
Using the Marketo SOAP API, you can check whether or not your website visitors have filled out a form and present them content accordingly. The following code below is unsupported and is intended to help you develop your own solution. In the resources section of the Marketo website, we use this method for our premium content. For leads who have already registered, their links go directly to the resource. Leads who haven't registered are given links to a landing page. In both cases, the link appears the same. Behind the scenes, a cookie is used to store whether or not this lead has registered: If the user has the premium registration cookie, the premium links are shown. If the user does not have that cookie, the lead's record is retrieved via the SOAP API. Based on the lead's record: If the lead has a valid email address, the premium content links are shown and the premium registration cookie is set. If not, the premium content links are not shown. Instead, they take leads to a landing page to fill out a form. First, you'll need to develop a SOAP API connection to Marketo. The attached ZIP file has a sample connection PHP file. You'll need to make the following changes in this file: ... $this->access_key = 'Your API Access Key Goes Here'; $this->secret_key = 'Your Secret API Key Goes Here'; // // The endpoint is in the "SOAP API Setup" page in the Marketo Admin section // ex. $soap_end_point = 'https://xx-1.marketo.com/soap/mktows/'; // $soap_end_point = 'Your SOAP API End Point URL Goes Here'; // // Errors are sent to this email address. Your web server // must be configured to send email for this to work correctly. // // ex. $this->error_email_address = 'example@example.com'; // $this->error_email_address = 'Put your debug email address here'; ... After creating your SOAP API connection, the next step is to implement the logic that determines which content to show if the user is logged in or not. The get_premium_url_status() function returns true if the lead has the premium cookie or if they've filled out a form. Otherwise, it returns false. You can use that result to determine what content the lead should see. The attached ZIP file has a PHP file that contains an example of this check.
View full article
Attached to this article is a ASP.NET C# implementation of Marketo's SOAP API. This is just a sample, but it may be useful for providing a starting point for building your own SOAP API client. Learn more: Marketo SOAP API Note: You will need access to experienced developers This is not supported development by Marketo Support. Our support engineers are not able to provide assistance in building or troubleshooting SOAP API's.
View full article