POST /api/v1/scripts

This endpoint is used to create a new script or update an existing one.

  • If the script ID in the request is -1, a new script is created.
  • Otherwise, the existing script with the given ID, if existing, is updated.

Scripts are disabled by default in PeerDB Cloud. It is enabled in PeerDB OSS and PeerDB Enterprise.

Request Fields

script
object
required

Describe the new script to be created or updated.

Response Fields

id
number

If successful, returns the ID of the created or updated script