Create a workflow

Creates a workflow definition. Set the target type, provide the corresponding configuration block, and use workflow triggers later to execute the workflow for a concrete resource instance. Requires the WORKFLOW.CREATE permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
namestringRequiredformat: "^.*$"0-256 characters
Name of the workflow.
referencestringRequiredformat: "^\S+$"0-256 characters
Unique reference.
statusenumRequired
Status of the workflow.
Allowed values:
descriptionstring or nullOptionalformat: "^.*$"0-256 characters
Description of what the workflow is used for.
typeenumOptional
Resource type the workflow runs for. This selects the matching workflow configuration and trigger data.
Allowed values:
customer_idslist of strings or nullOptional
Customer scope for the workflow. This limits which customers can use the workflow when it is triggered.
invoiceobjectOptional
Invoice workflow configuration that defines how the workflow runs for invoice events and executions.
paymentobjectOptional
Payment workflow configuration that defines how the workflow runs for payment events and executions.
pricing_plan_subscriptionobjectOptional
Pricing plan subscription workflow configuration that defines how the workflow runs for subscription events and executions.

Response

Created
object_typestring or nullRead-only
idstring or nullRead-only
namestringformat: "^.*$"0-256 characters
Name of the workflow.
descriptionstring or nullformat: "^.*$"0-256 characters
Description of what the workflow is used for.
typeenum
Resource type the workflow runs for. This selects the matching workflow configuration and trigger data.
Allowed values:
referencestringformat: "^\S+$"0-256 characters
Unique reference.
statusenum
Status of the workflow.
Allowed values:
created_atstring or nullRead-only
Date time when the workflow was created.
updated_atstring or nullRead-only
Date time when the workflow was last updated.
customer_idslist of strings or null
Customer scope for the workflow. This limits which customers can use the workflow when it is triggered.
invoiceobject
Invoice workflow configuration that defines how the workflow runs for invoice events and executions.
paymentobject
Payment workflow configuration that defines how the workflow runs for payment events and executions.
pricing_plan_subscriptionobject
Pricing plan subscription workflow configuration that defines how the workflow runs for subscription events and executions.

Errors

401
Unauthorized Error
403
Forbidden Error