Monitor API usage
Learn how to review your API usage with the API activity dashboard and API logs tool. Get an overview of recent calls made from your account, or modify filters to view subsets of your API activity data.
Monitor API activity
The API activity dashboard enables you to gain insights and track the long-term performance of your APIs. Effortlessly monitor high-level usage trends and stay informed about any ongoing issues.
![](https://files.readme.io/89ee58e-apiactivity.png)
Total calls
Displays the total number of API calls made from your account with the given filter criteria.
Error rate
The rate of errored calls out of total calls made.
Errors
Displays the total number of error statuses for API calls made from your account.
Filter criteria
The API activity dashboard can be filtered by endpoint, status, and time period.
If no available data matches the given criteria, the dashboard will display No Data Available. To reset your filter criteria to the default values, click Clear.
Endpoint
Results can be filtered by any individual endpoint. Legacy API endpoints are not included in this data set.
- All endpoints (default)
- Accounts
- Campaigns
- Catalogs
- Client
- Coupons
- Data privacy
- Events
- Flows
- Images
- Lists
- Metrics
- Profiles
- Segments
- Tags
- Templates
Status
Results can be filtered by the status of your API calls. For more information about what each code indicates and how to resolve errors, refer to the status codes and errors guide.
- All statuses (default)
- All success codes
- 200 - OK
- 201 - Created
- 202 - Accepted
- 204 - No content
- All failed codes
- All 4xx codes
- 400 - Bad request
- 401 - Not authorized
- 403 - Forbidden
- 404 - Not found
- 422 - Unprocessable entity
- 429 - Rate limit
- All 5xx codes
- 500 - Server error
- 502 - Service unavailable
Time period
Results can be filtered by the following time periods, based on your account’s current time zone:
- Today (default)
- Last 3 hours
- Last 3 days
- Last 7 days
- Last 30 days
- Last 90 days
- Last 24 hours
Review API logs
The API logs tool enables you to take a granular view of your API requests. The API logs tool displays recent API requests by status code, method, request path, private API key (truncated for security), and date.
![](https://files.readme.io/1e67a1b-apilogs.png)
Data retention
The API logs tool retains 14 days worth of API logs. API logs past this date will be unavailable, although the high-level aggregate information will continue to be stored in the API activity dashboard.
Filter criteria
The API logs can be filtered by endpoint request path, status code, method, and source, including public API key, private API key, or OAuth app. In the additional filter selector, filter by time period, a specified job, trace, or error ID, and API revision.
If no available data matches the given criteria, the dashboard will display No requests available. To reset your filter criteria to the default values, click Clear.
Search endpoint request path
Locate requests made to specific endpoints by pasting in the exact URL path of the endpoint, part of a URL path, or wildcard an ID using brackets, such as {id}.
Valid search examples:
/api/events
- Returns all calls hitting that exact URL path/api/events/{id}
- Returns all calls hitting that URL path, with ID as a wildcard search/api/events/4Gxu5nDJ2qp
- Returns all calls hitting that URL path for the exact given IDevent-bulk-create
- Returns/client/event-bulk-create
events
- Returns all paths that include events in the URL path, such as/client/events
,/client/event-bulk-create
,/api/events
, etc.
Status code
Results can be filtered by the status of your API calls. For more information about what each code indicates and how to resolve errors, refer to the status codes and errors guide.
- All success codes
- 200 - OK
- 201 - Created
- 202 - Accepted
- 204 - No content
- All failed codes
- All 4xx codes
- 400 - Bad request
- 401 - Not authorized
- 403 - Forbidden
- 404 - Not found
- 422 - Unprocessable entity
- 429 - Rate limit
- All 5xx codes
- 500 - Server error
- 502 - Service unavailable
Method
Filter your results by the HTTP method used to make the request.
- GET
- POST
- PUT
- PATCH
- DELETE
Source
- Public API key (account_id) - Calls authenticated with your account’s ID, also known as your public API key
- Klaviyo onsite tracking - Calls made using a front-end object, including
klaviyo
,klaviyo.js
,learnq
, etc. - Other - Calls made from your account attributed to other sources
- Klaviyo onsite tracking - Calls made using a front-end object, including
- Private API keys - Calls authenticated using one of your account’s private API keys
- OAuth - Calls made from an application connected to Klaviyo via OAuth
API revision
Search for requests made using a specific API revision. The current Stable and Beta revisions are marked with a label indicating the latest releases.
![](https://files.readme.io/aabbe3a-Screenshot_2024-04-12_at_3.33.13_PM.png)
Search by identifiers
Use advanced filters to search by ID. Search results will display all API calls that contain those identifiers in the API path, request, or response body. To filter by an identifier, that ID must be found in the path, request, or response body to appear in the search results.
Search by identifier is supported for POST
, PATCH
, and DELETE
requests, unless otherwise noted.
Supported identifiers include:
- Call ID - the ID assigned to an API call by Klaviyo
- Error ID - the ID assigned to an API call error
- Async job ID - the ID assigned to an asynchronous API request
- Resource ID - the ID of a resource, such as a profile, list, segment, campaign, catalog item, etc. Resource ID is supported for relationships for
POST
,PUT
,PATCH
, andDELETE
requests - Email - the email address associated with a profile
- Phone number - the phone number associated with a profile
- External ID - the external_id as stored in an integration such as Shopify or Magento
- Anonymous ID - the anonymous _kx value
- Private key - The private key used to authenticate an API request
- Catalog item ID, variant ID, or category ID - the identifiers used by custom catalogs
- Coupon ID - the external_id used by a coupon, as stored in an integration such as Shopify or Magento
- Metric name - the name associated with a Klaviyo, custom, or third-party metric
Details
The details window provides additional information about your API call.
- Call ID - an alphanumeric ID assigned to your call by Klaviyo
- Status code - the status, success, error, or other for the request
- Request path - the URL path of the endpoint used to make the request
- Method - HTTP method used to make the request
- Private API key - the API key used to send the request, truncated for account security
- Revision - the API revision used to resolve your request. For more information on revision handling, review the API versioning policy.
- User agent - a string that allows servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent
- Date - date and timestamp recorded by Klaviyo for the request
Request
The Request tab displays the request body of your API call, including query parameters, header, and body in JSON format. Quickly copy a portion of the call using the Copy button in the upper-left corner of each section
Response
The Response tab displays the response body of your request including the header in JSON format.
![The details window is shown twice, once showing the request body and once showing the response body.](https://files.readme.io/f493c08-Screenshot_2024-02-16_at_10.28.11_AM.png)
Job details
Job details for asynchronous API requests allows you to track the progress of your tasks. The job details tab differs by which endpoints you use. The table below outlines the information you can expect to find in the job details tab by supported endpoints.
Endpoints | Job details | Example |
---|---|---|
Bulk Profile Imports - Spawn Bulk Profile Import Job Catalogs - Spawn Create Categories Job - Spawn Update Categories Job - Spawn Delete Categories Job - Spawn Create Variants Job - Spawn Update Variants Job - Spawn Delete Variants Job - Spawn Create Items Job - Spawn Update Items Job - Spawn Delete Items Job Coupons - Spawn Coupon Code Bulk Create Job | The job progress is displayed as a percentage, alongside the total number of tasks. The job progress bar displays the number of completed jobs in blue, the number of pending jobs in green, and the number of errored jobs in yellow. Below the progress bar, the expiration date for all tasks associated with the job is displayed. Any tasks stuck in a pending or errored state at that date are considered expired. Expired jobs will show a “data not available” message instead of the progress bar. | ![]() Expired jobs ![]() |
Campaigns - Create Campaign Send Job - Update Campaign Send Job | Job status is a variant available for some asynchronous API calls and shows the current status in JSON format. - Queued - the job is waiting to be processed - Pending - the job is processing - Complete - the job process has completed - Cancelled - an issue prevented the job from processing or the job was canceled | ![]() |
Updated 5 months ago