Saltar al contenido principal
POST
/
v1
/
workflow
/
templates
/
{template_id}
/
copy
Copy Template
import requests

url = "https://api.diga.io/v1/workflow/templates/{template_id}/copy"

payload = {
    "flow_name": "<string>",
    "variables": {},
    "connections": [
        {
            "key": "<string>",
            "value": "<string>"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "flow_id": "<string>",
  "flow_name": "<string>",
  "edit_url": "<string>"
}

Autorizaciones

Authorization
string
header
requerido

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

Parámetros de ruta

template_id
string<uuid>
requerido

Cuerpo

application/json

Request to copy a template to the user's project.

flow_name
string | null

Custom name for the created flow. Defaults to template name.

variables
Variables · object

Values to replace <> placeholders. Supports string, number, boolean.

connections
ConnectionCredential · object[] | null

Credentials for connections required by the template.

Respuesta

Successful Response

Response after copying a template.

flow_id
string
requerido

Flow ID

flow_name
string
requerido

Name of the created flow

edit_url
string
requerido

URL to edit the flow