Skip to main content
POST
/
api
/
v1
/
external
/
knowledge
/
{knowledgeId}
/
versions
Append Knowledge version
curl --request POST \
  --url https://app.govworx.net/api/v1/external/knowledge/{knowledgeId}/versions \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "Cardiac Arrest - Adult (Updated)",
  "description": "Updated chest-compression rate per Q1 2026 guidelines.",
  "isAllCallers": "false",
  "externalVersion": "v1.2.0",
  "publish": "true",
  "apiControl": {
    "questions": "false",
    "incidentType": "false",
    "spokenInstructions": "false",
    "cadActions": "false",
    "smsMessages": "false",
    "dispatchTriggers": "false"
  },
  "interview": {
    "id": "<string>",
    "name": "Cardiac Arrest - Adult",
    "intent": "Caller reports an unresponsive adult with no pulse.",
    "service": "MEDICAL",
    "isRoot": true,
    "questionList": [
      {
        "id": 123,
        "referenceId": "q-1a2b3c4d",
        "text": "Is the patient breathing normally?",
        "intent": "<string>",
        "lowQualityCriteria": "<string>",
        "highQualityCriteria": "<string>",
        "evaluatable": true,
        "useInAssist": true,
        "isCritical": true,
        "required": true,
        "relatedQuestions": [
          {
            "id": 123,
            "displayCriteria": "<string>",
            "questionList": "<unknown>"
          }
        ]
      }
    ]
  },
  "actions": {
    "id": "<string>",
    "name": "Cardiac Arrest - Actions",
    "purpose": "<string>",
    "spokenInstructions": [
      {
        "referenceId": "si-1a2b3c4d",
        "instruction": "Place the heel of one hand on the center of the chest.",
        "sequence": 123,
        "conditionedOn": "<string>",
        "referenceMedia": "<string>",
        "evaluatable": true,
        "useInAssist": true,
        "required": true,
        "isCritical": true
      }
    ],
    "cadActions": [
      {
        "referenceId": "ca-1a2b3c4d",
        "instruction": "Enter call type CARDIAC.",
        "role": "CALLTAKER",
        "conditionedOn": "<string>",
        "sequence": 123,
        "evaluatable": true,
        "useInAssist": true,
        "required": true
      }
    ],
    "smsMessages": [
      {
        "referenceId": "sms-1a2b3c4d",
        "message": "We've dispatched help. Stay on the line.",
        "mediaRef": "<string>",
        "conditionedOn": "<string>",
        "sequence": 123
      }
    ],
    "dispatchTriggers": [
      {
        "referenceId": "dt-1a2b3c4d",
        "dispatchCode": "29B",
        "condition": "<string>",
        "sequence": 123
      }
    ],
    "media": [
      {
        "referenceId": "<string>",
        "name": "<string>",
        "description": "<string>",
        "mediaType": "IMAGE",
        "url": "<string>"
      }
    ]
  }
}
EOF
{ "version": 3, "externalVersion": "v1.2.0", "isPublished": true, "description": "<string>", "createdAt": "2023-11-07T05:31:56Z", "publishedAt": "2023-11-07T05:31:56Z", "apiControl": { "questions": "false", "incidentType": "false", "spokenInstructions": "false", "cadActions": "false", "smsMessages": "false", "dispatchTriggers": "false" }, "interview": { "id": "<string>", "name": "Cardiac Arrest - Adult", "intent": "Caller reports an unresponsive adult with no pulse.", "service": "MEDICAL", "isRoot": true, "questionList": [ { "id": 123, "referenceId": "q-1a2b3c4d", "text": "Is the patient breathing normally?", "intent": "<string>", "lowQualityCriteria": "<string>", "highQualityCriteria": "<string>", "evaluatable": true, "useInAssist": true, "isCritical": true, "required": true, "relatedQuestions": [ { "id": 123, "displayCriteria": "<string>", "questionList": "<unknown>" } ] } ] }, "actions": { "id": "<string>", "name": "Cardiac Arrest - Actions", "purpose": "<string>", "spokenInstructions": [ { "referenceId": "si-1a2b3c4d", "instruction": "Place the heel of one hand on the center of the chest.", "sequence": 123, "conditionedOn": "<string>", "referenceMedia": "<string>", "evaluatable": true, "useInAssist": true, "required": true, "isCritical": true } ], "cadActions": [ { "referenceId": "ca-1a2b3c4d", "instruction": "Enter call type CARDIAC.", "role": "CALLTAKER", "conditionedOn": "<string>", "sequence": 123, "evaluatable": true, "useInAssist": true, "required": true } ], "smsMessages": [ { "referenceId": "sms-1a2b3c4d", "message": "We've dispatched help. Stay on the line.", "mediaRef": "<string>", "conditionedOn": "<string>", "sequence": 123 } ], "dispatchTriggers": [ { "referenceId": "dt-1a2b3c4d", "dispatchCode": "29B", "condition": "<string>", "sequence": 123 } ], "media": [ { "referenceId": "<string>", "name": "<string>", "description": "<string>", "mediaType": "IMAGE", "url": "<string>" } ] } }

Path Parameters

knowledgeId
integer<int64>
required

GovWorx internal Knowledge id returned from the create endpoint.

Body

application/json

Append a new immutable version to an existing Knowledge entry. Provide at least one of interview or actions.

name
string

Optional updated name for the Knowledge entry. When supplied, replaces the existing name.

Maximum string length: 255
Example:

"Cardiac Arrest - Adult (Updated)"

description
string

Optional description. When supplied, updates both the Knowledge entry's top-level description and the new version's description. When omitted, the Knowledge description is unchanged and the version description defaults to 'Appended via external API'.

Example:

"Updated chest-compression rate per Q1 2026 guidelines."

isAllCallers
boolean
default:false

If true, marks this entry as the tenant's all-callers guide card (single per tenant). Omit to leave the existing value unchanged.

externalVersion
string

Optional partner-supplied version label. Free-form short string; stored but not used for ordering or lookup.

Maximum string length: 64
Example:

"v1.2.0"

publish
boolean
default:true

If true (default), publishes the new version immediately, replacing the previously published version.

apiControl
object

Optional. Ownership flags are set once at creation and are immutable — you do not need to resend them on every append. If omitted (recommended), the stored flags are used automatically. If supplied, each provided flag must match the value set on create (400 if different). To change ownership, delete the entry and recreate it.

interview
object

Interview content for the new version. API-owned questions (apiControl.questions = true): Send the full questionList. Echo a referenceId to update an existing question; omit it to add a new one. Unknown ids → 400. Omitting / null / [] results in an empty question list (full overwrite). GovWorx-owned questions (apiControl.questions = false): Omit questionList; it is carried forward automatically. Sending it is rejected (400).

actions
object

Action set content for the new version. For each API-owned sub-section (flag = true): send the updated list; echo a referenceId to update, omit to add new. Omit / null / [] = empty (full overwrite). For each GovWorx-owned sub-section (flag = false): omit that list entirely — it is carried forward automatically. Sending it is rejected (400).

Response

Version appended. Response includes the full new version with all GovWorx-generated referenceIds.

Full detail of a Knowledge version, including its normalized interview and action content. All referenceId values in the returned content are GovWorx-generated stable identifiers. Store these ids — they must be echoed in future append requests to update existing items in place.

version
integer<int32>

Monotonic version number, unique per Knowledge id. Use this in version-scoped routes.

Example:

3

externalVersion
string

Optional partner-supplied version label.

Example:

"v1.2.0"

isPublished
boolean

True if this version is the currently published version for the Knowledge entry.

description
string

Optional description of this version, as provided on create or append.

createdAt
string<date-time>

UTC timestamp when this version was created (i.e., when GovWorx received and stored the payload).

publishedAt
string<date-time>

UTC timestamp when this version was last published (made active), or null if never published.

apiControl
object

The active API ownership flags for this version. Echoes what was declared on create and is immutable between versions. Use this to confirm which sections are API-controlled vs GovWorx-controlled.

interview
object

Interview (question list) content for this version with all GovWorx-generated referenceIds populated. Null if this knowledge type does not carry interview content.

actions
object

Action set content for this version with all GovWorx-generated referenceIds populated across spoken instructions (si-), CAD actions (ca-), SMS messages (sms-), and dispatch triggers (dt-). Null if no action content exists for this version.