Versions API

Manage product versions with the Versions API. Track version releases, development status, and release notes. Ideal for CI/CD automation.

Endpoints

Version Object

The version object represents a product version with its status and release information.

AttributeTypeDescription
idstringUnique identifier for the version (e.g., ver_abc123)
productIdstringID of the associated product
versionstringVersion number in semver format (e.g., 1.2.0), without 'v' prefix
goalstring | nullVersion goal or objective
statusstringVersion status: PLANNED, DEV, TESTING, RELEASED
releaseNotesstring | nullRelease notes for the version
plannedAtstring | nullPlanned release date in ISO 8601 format
releasedAtstring | nullActual release date in ISO 8601 format
createdAtstringISO 8601 timestamp of creation
updatedAtstringISO 8601 timestamp of last update

Version Statuses

The status indicates the current state of the version in its lifecycle.

AttributeTypeDescription
PLANNEDstringVersion is planned but not yet started
DEVstringVersion is currently in development
TESTINGstringVersion is in testing/QA phase
RELEASEDstringVersion has been released to production
GET

List Versions

Returns a list of versions for a specific product. Results are ordered by creation date (newest first).

Request

Bash
curl https://api.myopcs.com/api/v1/products/prod_abc123/versions \
  -H "Authorization: Bearer YOUR_API_KEY"

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: PLANNED, DEV, TESTING, RELEASED

Response

{}JSON
{
  "data": [
    {
      "id": "ver_abc123",
      "productId": "prod_abc123",
      "version": "1.2.0",
      "goal": "Add dark mode and improve performance",
      "status": "RELEASED",
      "releaseNotes": "This release includes dark mode support and various performance improvements.",
      "plannedAt": "2024-01-15T00:00:00Z",
      "releasedAt": "2024-01-20T14:30:00Z",
      "createdAt": "2024-01-10T09:00:00Z",
      "updatedAt": "2024-01-20T14:30:00Z"
    },
    {
      "id": "ver_def456",
      "productId": "prod_abc123",
      "version": "1.3.0",
      "goal": "API v2 and webhooks",
      "status": "DEV",
      "releaseNotes": null,
      "plannedAt": "2024-02-15T00:00:00Z",
      "releasedAt": null,
      "createdAt": "2024-01-18T11:00:00Z",
      "updatedAt": "2024-01-25T10:00:00Z"
    }
  ]
}
POST

Create Version

Creates a new version for a product. The version number must be unique within the product. Use this endpoint in your CI/CD pipeline to automatically record version releases.

Request

Bash
curl -X POST https://api.myopcs.com/api/v1/products/prod_abc123/versions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "1.4.0",
    "goal": "Add export functionality",
    "status": "RELEASED",
    "releasedAt": "2024-01-25",
    "releaseNotes": "Added CSV and PDF export for all reports."
  }'

Body Parameters

ParameterTypeRequiredDescription
versionstringYesVersion number in semver format (e.g., 1.2.0). 'v' prefix will be stripped automatically.
goalstringNoVersion goal or objective
statusstringNoVersion status: PLANNED (default), DEV, TESTING, RELEASED
plannedAtstringNoPlanned release date in YYYY-MM-DD format
releasedAtstringNoActual release date in YYYY-MM-DD format (use when status is RELEASED)
releaseNotesstringNoRelease notes for the version

Response

{}JSON
{
  "data": {
    "id": "ver_new123",
    "productId": "prod_abc123",
    "version": "1.4.0",
    "goal": "Add export functionality",
    "status": "RELEASED",
    "releaseNotes": "Added CSV and PDF export for all reports.",
    "plannedAt": null,
    "releasedAt": "2024-01-25T00:00:00Z",
    "createdAt": "2024-01-25T16:00:00Z",
    "updatedAt": "2024-01-25T16:00:00Z"
  }
}
GET

Retrieve a Version

Retrieves the details of an existing version by its ID.

Request

Bash
curl https://api.myopcs.com/api/v1/products/prod_abc123/versions/ver_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{}JSON
{
  "data": {
    "id": "ver_abc123",
    "productId": "prod_abc123",
    "version": "1.2.0",
    "goal": "Add dark mode and improve performance",
    "status": "RELEASED",
    "releaseNotes": "This release includes dark mode support and various performance improvements.",
    "plannedAt": "2024-01-15T00:00:00Z",
    "releasedAt": "2024-01-20T14:30:00Z",
    "createdAt": "2024-01-10T09:00:00Z",
    "updatedAt": "2024-01-20T14:30:00Z"
  }
}