What are developer tools?
Congratulations on making your first API calls! Normally, you will not have a solution in front of you when making API calls, but Klaviyo has several built in tools that can help you test, monitor, and troubleshoot your API calls.
From your test account, access the developer tools by clicking on your account name in the bottom left hand corner and navigating to Integrations > Developer tools.
Identify the tools available
From the Developer Tools page, you can access your Dashboard, Logs, and Sample data. Read on to learn more about these tools.
Dashboard
The dashboard shows an overview of all API calls being made into your account.
You can filter by type of endpoint, status of the call, and timeframe. The graph will show the number of successful and unsuccessful calls, as well as the rate at which API calls run into errors.
Use this page to monitor high-level trends and quickly check to see if any major issues are occurring.
API endpoint audit tool
Use the API endpoint audit tool to see a more detailed view of all of the API calls being made from your Klaviyo account.
Exporting the API Report will download a CSV of the last 14 days of API usage data. This includes the endpoints being used, information about the private API keys used with each call, the number of requests made to each endpoint, and more.
Use this report to make sure you are on the most recent version of Klaviyo's APIs, review API keys and labels, and get a deeper understanding of the most common endpoints being used.
Logs
The API Logs tool shows an entry for each individual API call in the last 14 days. You can see a summary of each API call, as well as detailed information about all of the data in the request and response.
You can filter logs based on the status or type of call, and you can also search for specific API calls.
Use this tab to troubleshoot unsuccessful API calls or see what information is being passed in a specific API call.
Now that you've made some API calls, you should see them in the Logs tab.
Sample data
The sample data tab allows you to generate example marketing, ecommerce, and/or catalog data in your test account. This includes sample events, profiles, and catalog items.
Use this sample data to practice retrieving and manipulating data from your test account.
You can only generate each type of sample data (marketing, ecommerce, and catalog) once in each account.
Navigate the API logs tool
API calls have many different parts, and we've seen how these look in Postman. Let's map the different parts of an API call to the API logs tool to see how these show up in Klaviyo.
The API logs overview shows a high level overview of your API calls, but you can view the specifics of each call by clicking View details on the right hand side of each log entry.
Method
You can see the method of the API call in the log overview:
Method is also seen in the details of each call:
Headers
You can see Headers from within the details of each API call. This includes headers that are set in each Klaviyo API call, like Authorization and Revision, as well as headers that are automatically set:
You may be surprised by how many headers are automatically set. These are put in place to set the request metadata, such as information about the format of the request and response body.
Body
The Body can be seen in the details of each API call. This will be the exact body you pass through in Postman:
Any requests that do not have a body (like GET requests) will show "This request does not have a body."
Query parameters
You can see query parameters from within the details of each API call:
Path parameters
Path parameters do not have a specific section called "path parameters," but you can see them as part of the request URL from both the overview and the details under Request path. In this example, the POST request does not have any path parameters, but the GET request includes RcFaQ5, a path parameter representing the list to get information about:
In this case, the Get List endpoint has a request URL of https://a.klaviyo.com/api/lists/{id}/, where {id} is the ID of the list in question.
Response
The response code shows up in the log overview:
For more detailed information and the response body, click into the details of each API call: