Skip to content

OpenAPI 3.1 Specification

GrowthOS publishes OpenAPI 3.1 specifications for both APIs. These machine-readable specs are the source of truth for request/response shapes, authentication, and endpoint metadata.

Ingest API Spec

Endpoint: https://api.growthos.io/openapi/ingest.yaml

Covers the client-facing event ingestion endpoints — track, identify, page, and batch.

Management API Spec

Endpoint: https://api.growthos.io/openapi/management.yaml

Covers all server-side CRUD operations for contacts, segments, referrals, campaigns, surveys, waitlists, webhooks, analytics, and settings.

These specs can be consumed by:

  • Code generators — openapi-generator, Orval, openapi-typescript
  • Testing tools — Postman, Insomnia, Hurl
  • Documentation generators — Redoc, Stoplight, Swagger UI

Below is a condensed skeleton of the Management API specification showing the overall layout, key paths, schemas, and security configuration.

openapi: "3.1.0"
info:
title: GrowthOS Management API
version: "1.0.0"
description: Server-side API for managing all GrowthOS resources.
contact:
name: GrowthOS
url: https://javajack.github.io/growthos/api/overview/
servers:
- url: https://api.growthos.io/v1
description: Production
- url: https://api-staging.growthos.io/v1
description: Staging
security:
- BearerAuth: []
paths:
/contacts:
get:
summary: List contacts
operationId: listContacts
tags: [Contacts]
parameters:
- $ref: "#/components/parameters/cursor"
- $ref: "#/components/parameters/limit"
responses:
"200":
description: Paginated list of contacts
content:
application/json:
schema:
$ref: "#/components/schemas/ContactList"
/contacts/{id}:
get:
summary: Get a contact
operationId: getContact
tags: [Contacts]
# ... (abbreviated — full spec covers all endpoints)
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: "gos_sk_*"
schemas:
Contact:
type: object
properties:
id:
type: string
example: "con_abc123"
user_id:
type: string
email:
type: string
format: email
traits:
type: object
additionalProperties: true
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
ContactList:
type: object
properties:
data:
type: array
items:
$ref: "#/components/schemas/Contact"
has_more:
type: boolean
next_cursor:
type: string
nullable: true
Error:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: array
items:
type: object
request_id:
type: string
parameters:
cursor:
name: cursor
in: query
schema:
type: string
limit:
name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 50
tags:
- name: Contacts
- name: Segments
- name: Referrals
- name: Campaigns
- name: Surveys
- name: Waitlists
- name: Webhooks
- name: Analytics
- name: Settings

The GrowthOS API follows consistent conventions across every resource and endpoint.

  1. Prefixed IDs — All resource IDs use a type prefix for readability and debugging: con_ (contacts), seg_ (segments), prog_ (programs), camp_ (campaigns), srv_ (surveys), wl_ (waitlists), evt_ (events).

  2. ISO 8601 timestamps — Every created_at, updated_at, and event timestamp is in ISO 8601 format with UTC timezone.

  3. Cursor pagination — All list endpoints use opaque cursor-based pagination with has_more and next_cursor fields. No offset pagination.

  4. Explicit nullability — Nullable fields are marked with nullable: true in the spec. Fields without this annotation are always present.

  5. Enum status fields — Status fields use strict enums (e.g., active, paused, archived) so client code can safely pattern-match.

  6. Consistent error schema — Every error response uses the same Error schema with code, message, details, and request_id.


Use the published spec URLs with standard OpenAPI tooling to generate clients, types, and collections.

Generate TypeScript type definitions from the spec:

Terminal window
npx openapi-typescript \
https://api.growthos.io/openapi/management.yaml \
-o growthos-types.d.ts

Then use the generated types in your application:

import type { components } from "./growthos-types";
type Contact = components["schemas"]["Contact"];
type ContactList = components["schemas"]["ContactList"];

GrowthOS tracks spec changes alongside the API versioning strategy.

Versioning rules

  • Additive changes (new endpoints, new optional fields, new enum values) are published to the current spec version without a version bump.
  • Breaking changes (removed fields, type changes, removed endpoints) result in a new major API version with a separate spec file.
  • The spec info.version field reflects the latest revision date within a major version.

Each OpenAPI tag maps to a functional area and requires specific API key scopes.

TagDescriptionRequired Scope
ContactsContact CRUD and lookupcontacts:read / contacts:write
SegmentsSegment rules and membershipsegments:read / segments:write
ReferralsPrograms, links, conversionsreferrals:read / referrals:write
CampaignsEmail campaigns and sequencescampaigns:read / campaigns:write
SurveysSurvey management and responsessurveys:read / surveys:write
WaitlistsWaitlist and entrieswaitlists:read / waitlists:write
WebhooksWebhook endpoint managementwebhooks:read / webhooks:write
AnalyticsQueries, funnels, cohortsanalytics:read
SettingsProject config and API keyssettings:read / settings:write