POST
/
v1
/
workflows
curl --request POST \
  --url https://api.base39.io/v1/workflows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "status": "draft",
  "content": {
    "trigger": {
      "id": "<string>",
      "name": "<string>",
      "type": "webhook-base39",
      "parameters": {
        "enabled": true,
        "event": "loan.created"
      }
    },
    "actions": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "conditional",
        "parameters": {
          "conditions": [
            [
              "<string>"
            ]
          ],
          "default": "<string>"
        }
      }
    ],
    "subflows": {}
  }
}'
{
  "id": "<any>",
  "name": "<string>",
  "status": "draft",
  "content": {
    "trigger": {
      "id": "<string>",
      "name": "<string>",
      "type": "webhook-base39",
      "parameters": {
        "enabled": true,
        "event": "loan.created"
      }
    },
    "actions": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "conditional",
        "parameters": {
          "conditions": [
            [
              "<string>"
            ]
          ],
          "default": "<string>"
        }
      }
    ],
    "subflows": {}
  },
  "createdAt": "2023-08-25T22:38:41.134Z",
  "updatedAt": "2023-08-25T22:38:41.134Z",
  "deleted": false,
  "createdBy": {
    "clientId": "key_643969122d598f5b62d15fbc",
    "externalClientId": "optr_643969122d598f5b62d15fbd"
  },
  "updatedBy": {
    "clientId": "key_643969122d598f5b62d15fbc",
    "externalClientId": "optr_643969122d598f5b62d15fbd"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Criar um workflow

Response

201 - application/json

Retorna o objeto Workflow se a criação for bem-sucedida. Retorna um erro se os parâmetros de criação forem inválidos (por exemplo, especificar um documento inválido).

Este objeto representa um workflow. Ele permite que você crie fluxos de trabalho dinâmicos.