Create an alteration package

Creates an alteration package for a policy. If the policy already has a pending alteration package with the same key and the same data, the new package supersedes it: the existing package is archived and the new one has refreshed_from_alteration_package_id set to it. This only happens when the caller also has permission to archive alteration packages, and when the product module returns a single alteration package. Otherwise the new package is created alongside the existing one, which stays pending. Requests through the embed flow never supersede.

Path Params
string
required

The unique identifier of the policy

Query Params
string

To perform an idempotent request, provide the idempotency_key query parameter with the request. An idempotency key is a unique value generated by the client which the platform uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using a V4 UUID, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.

Body Params
string
required

The identifier of the alteration hook.

data
object
required

Custom module-specific fields stored against the alteration package. See product modules for more details.

boolean

If true, the first alteration package will be automatically applied to the policy after creation. The response will be an array containing a single applied alteration package.

boolean

If true and auto_apply is true, notifications will not be sent when the alteration package is applied.

Responses

409

The caller can archive alteration packages, and another request superseded, archived or applied the matching pending alteration package first.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json