Lytics Accounts API

Manage Lytics accounts and retrieve account information

OpenAPI Specification

lytics-accounts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Lytics REST Accounts API
  description: The Lytics REST API provides programmatic access to user profile management, behavioral segment queries, content affinity scores, audience activations, data stream ingestion, Cloud Connect warehouse integrations, and job orchestration for the Lytics customer data platform (CDP).
  version: 2.1.0
  contact:
    name: Lytics Support
    url: https://support.lytics.com/hc/en-us
  license:
    name: Proprietary
    url: https://www.lytics.com/
servers:
- url: https://api.lytics.io
  description: Lytics Production API
security:
- ApiKeyQuery: []
- ApiKeyHeader: []
tags:
- name: Accounts
  description: Manage Lytics accounts and retrieve account information
paths:
  /api/account:
    get:
      operationId: listAccounts
      summary: List accounts
      description: Returns a list of Lytics accounts accessible with the provided API key.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/ApiKeyParam'
      responses:
        '200':
          description: Successful response with account list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /api/account/{aid}:
    get:
      operationId: getAccount
      summary: Get account by AID
      description: Returns the account details for the specified account ID.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AidPath'
      - $ref: '#/components/parameters/ApiKeyParam'
      responses:
        '200':
          description: Successful response with account details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized — missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    AidPath:
      name: aid
      in: path
      required: true
      description: The Lytics account ID (AID)
      schema:
        type: string
    ApiKeyParam:
      name: key
      in: query
      required: false
      description: Lytics API key (required unless passed via Authorization header)
      schema:
        type: string
  schemas:
    AccountListResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 200
        message:
          type: string
          example: ok
        data:
          type: array
          items:
            $ref: '#/components/schemas/Account'
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Human-readable error message
          example: invalid API key
    AccountResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 200
        message:
          type: string
          example: ok
        data:
          $ref: '#/components/schemas/Account'
    Account:
      type: object
      description: A Lytics account record
      properties:
        aid:
          type: string
          description: Account ID
          example: '12345'
        name:
          type: string
          description: Account display name
          example: ACME Corp
        apikey:
          type: string
          description: Account-level API key
        created:
          type: string
          format: date-time
          description: Timestamp when the account was created
        modified:
          type: string
          format: date-time
          description: Timestamp when the account was last modified
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: Lytics API key passed as a query parameter. Obtain your API key from the Lytics account settings.
    ApiKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Lytics API key passed as an Authorization header value.
externalDocs:
  description: Lytics API Reference Documentation
  url: https://docs.lytics.com/reference