Skip to main content
POST
/
api
/
v1
/
external
/
knowledge
Create Knowledge entry
curl --request POST \
  --url https://app.govworx.net/api/v1/external/knowledge \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "Cardiac Arrest - Adult",
  "provider": "APCO",
  "externalId": "apco-card-cardiac-arrest-adult",
  "externalVersion": "v1.0",
  "description": "APCO standard protocol for adult cardiac arrest.",
  "knowledgeType": "GUIDE_CARD",
  "publish": "true",
  "apiControl": {
    "questions": "false",
    "incidentType": "false",
    "spokenInstructions": "false",
    "cadActions": "false",
    "smsMessages": "false",
    "dispatchTriggers": "false"
  },
  "isAllCallers": "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
{
  "id": 12345,
  "name": "Cardiac Arrest - Adult",
  "description": "<string>",
  "source": "API_IMPORT",
  "provider": "APCO",
  "knowledgeType": "GUIDE_CARD",
  "externalId": "apco-card-cardiac-arrest-adult",
  "publishedVersion": 3,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "versions": [
    {
      "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>"
          }
        ]
      }
    }
  ]
}

Body

application/json

Create a new Knowledge entry along with its first version. Provide at least one of interview or actions.

name
string
required

Human-readable name for the Knowledge entry (e.g., the guide card title).

Example:

"Cardiac Arrest - Adult"

provider
string
required

Identifier of the organization authoring this Knowledge entry. Common values include APCO, PowerPhone, IAED, or a tenant-internal name for in-house authoring.

Maximum string length: 255
Example:

"APCO"

externalId
string
required

Partner-supplied identifier. Stored verbatim and unique per provider/tenant. Used to look up the GovWorx internal id and for idempotency on retries.

Maximum string length: 255
Example:

"apco-card-cardiac-arrest-adult"

externalVersion
string
required

Partner-supplied version label for this submission. Free-form short string; stored alongside the version for traceability.

Maximum string length: 64
Example:

"v1.0"

description
string

Optional description shown in the GovWorx UI.

Example:

"APCO standard protocol for adult cardiac arrest."

knowledgeType
enum<string>
default:GUIDE_CARD

Classification of the Knowledge entry. Defaults to GUIDE_CARD. Only GUIDE_CARD and INSTRUCTION_CARD are supported; any other value is rejected. GUIDE_CARD carries interview + action content; INSTRUCTION_CARD carries action content only.

Available options:
GUIDE_CARD,
INSTRUCTION_CARD
Example:

"GUIDE_CARD"

publish
boolean
default:true

If true (default), publishes the created version immediately so it becomes available to runtime consumers.

apiControl
object

Declares which sections of this Knowledge entry are owned by the external API. All flags default to false (GovWorx-controlled) when absent. Flags are immutable after creation — to change ownership, delete and recreate the entry. See KnowledgeApiControl for per-flag details.

isAllCallers
boolean
default:false

If true, marks this entry as the tenant's all-callers guide card (single per tenant). Default false.

interview
object

Interview (question list) content. Required for GUIDE_CARD; not supported on INSTRUCTION_CARD. At least one of interview or actions must be present. GovWorx generates a stable referenceId (q-{8 hex}) for every question — the response echoes these back. Store them; echo them on future appends to update existing questions in place. Ownership of the question list is declared via the top-level apiControl.questions flag.

actions
object

Action set content for the guide card or instruction card. At least one of interview or actions must be present. GovWorx generates stable referenceIds for every item (si-, ca-, sms-, dt- prefixes) — the response echoes these back. Store them; echo them on future appends to update existing items. Per-sub-section ownership is declared via the top-level apiControl flags.

Response

Knowledge entry created. The first version is always version 1, with description 'Created via external API'. If publish=true (default) the version is immediately active. Response includes all GovWorx-generated referenceIds — store them for future appends.

Detail view of a Knowledge entry, including its version list.

id
integer<int64>

GovWorx internal Knowledge id. Use this in subsequent API calls.

Example:

12345

name
string

Human-readable name of the Knowledge entry.

Example:

"Cardiac Arrest - Adult"

description
string

Optional description shown in the GovWorx UI.

source
string

Source of the entry. API_IMPORT indicates it was loaded via this API.

Example:

"API_IMPORT"

provider
string

Identifier of the organization that authored this Knowledge entry. Common values include APCO, PowerPhone, IAED, or a tenant-internal name for in-house authoring.

Example:

"APCO"

knowledgeType
enum<string>

Classification of the Knowledge entry.

Available options:
GUIDE_CARD,
INSTRUCTION_CARD,
POLICY,
MEMO_BRIEFING,
TRAINING,
GENERAL_KNOWLEDGE,
NON_EMERGENCY_LINE_ABILITY
Example:

"GUIDE_CARD"

externalId
string

Partner-supplied identifier if one was provided on create.

Example:

"apco-card-cardiac-arrest-adult"

publishedVersion
integer<int32>

Version number of the currently published version, or null if none is published.

Example:

3

createdAt
string<date-time>

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

updatedAt
string<date-time>

UTC timestamp when this entry was last modified — a new version was added, the published version changed, or metadata was updated.

versions
object[]

All versions for this Knowledge entry, including their interview and action content.