contentstack Accounts API

Accounts represent authenticated connections to external services and third-party platforms used by automations as action targets.

OpenAPI Specification

contentstack-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Contentstack Analytics Accounts 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: Accounts
  description: Accounts represent authenticated connections to external services and third-party platforms used by automations as action targets.
paths:
  /v1/organizations/{organization_uid}/projects/{project_uid}/accounts:
    get:
      operationId: getAllAccounts
      summary: Get all accounts
      description: Retrieves all external service account connections configured for the automation project, such as connections to Slack, email services, or other third-party platforms.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/OrganizationUid'
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: A list of external service account connections.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    ProjectUid:
      name: project_uid
      in: path
      required: true
      description: The unique identifier of the automation project.
      schema:
        type: string
    OrganizationUid:
      name: organization_uid
      in: path
      required: true
      description: The unique identifier of the organization.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    AccountList:
      type: object
      description: A list of external service account connections.
      properties:
        data:
          type: array
          description: Array of account connection objects.
          items:
            $ref: '#/components/schemas/Account'
    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.
    Account:
      type: object
      description: An authenticated connection to an external service for use in automations.
      properties:
        uid:
          type: string
          description: Unique identifier of the account connection.
        name:
          type: string
          description: Display name of the account connection.
        service:
          type: string
          description: The name of the external service (e.g., Slack, SendGrid).
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the account connection was created.
  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