Create a workflow
Changed onPersist a new workflow definition. Each chain-aware trigger and node carries its own required chainId (there is no workflow-level chain); the server validates those chains and ensures the smart wallet belongs to the authenticated user. Returns the persisted Workflow with its server-assigned id and createdAt.
When the gateway config session_policy_deploy_check is on, a workflow whose fund-moving steps the runner's usable grant does not cover is refused with 409 SESSION_POLICY_NOT_COVERING. required is the grant those steps still need. A fund-moving workflow whose single usable grant has already expired is 409 SESSION_POLICY_EXPIRED, including when the workflow has no end date. A fund-moving step whose target cannot be read stays 409 SESSION_POLICY_TARGET_UNRESOLVED even when that grant has expired. A grant with no recorded expiry is not expired. A grant made for a session signer the gateway no longer uses is 409 SESSION_POLICY_SIGNER_RETIRED: it cannot execute however well it covers the workflow. The owner grants again. A workflow that only notifies passes with no grant. The flag defaults to off, so today's callers are unchanged.
Request
- Base URLhttps://api.avaprotocol.org/api/v1
- AuthHTTP bearer
Request body
Example request
{
"smartWalletAddress": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"trigger": {
"config": {
"chainId": 11155111
}
},
"nodes": [
{
"config": {
"destination": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"chainId": 11155111
}
}
]
}Response
Workflow created.
Example response
{
"id": "01JG2FE5MDVKBPHEG0PEYSDKAC",
"owner": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"smartWalletAddress": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"trigger": {
"config": {
"chainId": 11155111
}
},
"nodes": [
{
"config": {
"destination": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"chainId": 11155111
}
}
]
}Changes
- info
added the new optional request property
//////// - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info