CreateDefinition
POST
/api/v1/t/{tenant}/workflows/definitions
const url = 'https://example.com/api/v1/t/example/workflows/definitions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","triggerDocumentTypeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","copyOf":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","copyOfTemplate":"InvoiceApproval","copyOfRecipe":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/t/example/workflows/definitions \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "triggerDocumentTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "copyOf": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "copyOfTemplate": "InvoiceApproval", "copyOfRecipe": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”tenant
required
string
Tenant slug
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “ Responses ”Created
Media typeapplication/json
object
definitionId
required
string format: uuid
Examplegenerated
{ "definitionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Bad Request
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Conflict
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Too Many Requests
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}