Create a program
/api/v1/programs
operationId: program.create
Base: https://portal.watcheye.com.au/api/v1/programs
Create a new program in the calling account. Only program_name is required;
every other field has a sensible default.
Defaults
Fields you do not supply default to:
status-activedata_retention_months-12event_grouping-separate(withmax_separate_eventsdefaulting to 10)report_emails- emptydefault_risk_level-low
Idempotency
This endpoint accepts the Idempotency-Key header so that retries on network failure are safe. See the Idempotency section of the API guide for the full contract.
Header parameters
| Field | Description |
|---|---|
Idempotency-Key |
string [max 255 characters] Optional client-generated key (typically a UUID) that lets you safely retry a write
request without risk of duplicate work or duplicate billing. A retry with the same key
and body returns the original response verbatim, with the Honoured on |
Request body
Content type application/json.
The program details
| Field | Description |
|---|---|
program_namerequired |
string [2..255 characters] |
status |
string |
report_emails |
array of strings [max 5 items] or null Email addresses (max 5) that receive event report notifications |
data_retention_months |
integer |
event_grouping |
string |
max_separate_events |
integer [5..100] or null Required when |
default_risk_level |
string or null The risk level pre-filled when a new entity is added to this program. When set to |
Responses
Program created
application/json
| Field | Description |
|---|---|
data |
object |
data. |
string (uuid) The program's UUID |
data. |
string A short obfuscated public identifier for the program (e.g. "P-123-456-789") |
data. |
string The display name of the program |
data. |
string Lifecycle status of the program:
|
data. |
array of strings Email addresses (max 5) that receive event report notifications for this program |
data. |
integer How long, in months, to keep entity data for. Permitted values: |
data. |
string Whether events from the same entity should be grouped into one event:
|
data. |
integer or null When |
data. |
string or null The risk level pre-filled when a new entity is added to this program:
|
data. |
string (date-time) ISO 8601 timestamp at which the program was created |
data. |
string (date-time) ISO 8601 timestamp at which the program was last updated |
api_reference |
string (uuid) |
Conflict - a request with this Idempotency-Key is currently being processed
application/json
| Field | Description |
|---|---|
message |
string |
Idempotency-Key was reused with a different request body
application/json
| Field | Description |
|---|---|
message |
string |