Contentstack Analytics API

The Contentstack Analytics API provides access to usage and performance metrics for CMS, Launch, and Automate products within a Contentstack organization. Developers can retrieve analytics data programmatically to build custom dashboards, monitor content delivery performance, and track platform usage against plan limits.

OpenAPI Specification

contentstack-analytics-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Contentstack Accounts Analytics API
  description: The Contentstack Analytics API provides access to usage and performance metrics for CMS, Launch, and Automate products within a Contentstack organization. Developers can retrieve analytics data programmatically to build custom dashboards, monitor content delivery performance, and track platform usage against plan limits. The API returns structured data suitable for aggregation with external analytics and business intelligence tools. Access is restricted to organization Owners and Admins. Requests use async job-based processing where initial POST calls queue the job and a subsequent GET call retrieves the results.
  version: v2
  contact:
    name: Contentstack Support
    url: https://www.contentstack.com/contact
  termsOfService: https://www.contentstack.com/legal/terms-of-service
servers:
- url: https://api.contentstack.io
  description: AWS North America Production Server
- url: https://eu-api.contentstack.com
  description: AWS Europe Production Server
- url: https://au-api.contentstack.com
  description: AWS Australia Production Server
security:
- bearerAuth: []
- authtokenAuth: []
tags:
- name: Analytics
  description: Analytics endpoints provide usage metrics for Launch projects such as cache revalidation quota consumption.
paths:
  /organizations/cache-revalidation-usage:
    get:
      operationId: getCacheRevalidationUsage
      summary: Get cache revalidation usage
      description: Retrieves the organization's current cache revalidation quota usage, showing how many revalidation requests have been used against the organization's plan limit.
      tags:
      - Analytics
      responses:
        '200':
          description: Cache revalidation usage metrics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CacheUsage'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      description: Standard error response.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
        error_code:
          type: integer
          description: Numeric error code.
    CacheUsage:
      type: object
      description: Cache revalidation usage metrics for the organization.
      properties:
        used:
          type: integer
          description: Number of cache revalidation requests used in the current period.
        limit:
          type: integer
          description: Maximum number of cache revalidation requests allowed per period.
        period_start:
          type: string
          format: date-time
          description: Start of the current usage period.
        period_end:
          type: string
          format: date-time
          description: End of the current usage period.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token (M2M) with analytics access.
    authtokenAuth:
      type: apiKey
      in: header
      name: authtoken
      description: Contentstack user authtoken. Only organization Owners and Admins can access analytics.
externalDocs:
  description: Contentstack Analytics API Documentation
  url: https://www.contentstack.com/docs/developers/apis/analytics-api