Skip to main content
PATCH
/
v1
/
programs
/
{id}
Update a program
curl --request PATCH \
  --url https://api.scrip.dev/v1/programs/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "description": "Updated description",
  "name": "Updated Program Name",
  "on_unknown_participant": "REJECT",
  "status": "SUSPENDED"
}
'
{
  "created_at": "2024-01-15T10:30:00Z",
  "deleted_at": "2023-11-07T05:31:56Z",
  "description": "Quarterly sales incentive program",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Q1 Sales Bonus",
  "on_unknown_participant": "CREATE",
  "status": "ACTIVE",
  "updated_at": "2024-01-15T10:30:00Z"
}
Updates a program’s name, description, on_unknown_participant, or status. Only include the fields you want to change; omitted fields are left unchanged. Status can be set to ACTIVE, SUSPENDED, or ARCHIVED. A SUSPENDED program rejects new incoming events but preserves all data. An ARCHIVED program also rejects events and is hidden from list results. Both can be moved back to ACTIVE at any time.
For usage patterns and examples, see the Programs guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Program ID

Body

application/json

Fields to update

description
string

Program description

Maximum string length: 1000
Example:

"Updated description"

name
string

Program name

Required string length: 1 - 255
Example:

"Updated Program Name"

on_unknown_participant
enum<string>

How to handle events for unregistered participants

Available options:
CREATE,
REJECT
Example:

"REJECT"

status
enum<string>

Lifecycle state

Available options:
ACTIVE,
SUSPENDED,
ARCHIVED
Example:

"SUSPENDED"

Response

Updated program

created_at
string<date-time>

When the program was created

Example:

"2024-01-15T10:30:00Z"

deleted_at
string<date-time>

Set when the program is archived

description
string

Optional program description

Example:

"Quarterly sales incentive program"

id
string<uuid>

Program ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string

Program name

Example:

"Q1 Sales Bonus"

on_unknown_participant
string

How events for unregistered participants are handled

Example:

"CREATE"

status
string

Lifecycle state

Example:

"ACTIVE"

updated_at
string<date-time>

When the program was last modified

Example:

"2024-01-15T10:30:00Z"