Automatizaciones
Publicar automatización
Publica el borrador actual como una versión inmutable.
POST
/
workflows
/
{workflowId}
/
publish
Publicar automatización
curl --request POST \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish \
--header 'x-ib-api-key: <api-key>'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish"
headers = {"x-ib-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish';
const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
.header("x-ib-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-ib-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ib-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
.post(null)
.addHeader("x-ib-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-ib-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish' -Method POST -Headers $headers{
"workflow": {
"id": "<string>",
"name": "<string>",
"status": "enabled",
"trigger": {
"type": "webhook",
"secret": "<string>"
},
"steps": [
{
"actionKey": "browser.use",
"task": "<string>",
"resultSchema": {
"type": "object"
},
"wait": {
"initialDelaySeconds": 30,
"pollIntervalSeconds": 15,
"timeoutSeconds": 3600
},
"id": "<string>",
"name": "<string>"
}
],
"createdAt": 123,
"lastUpdatedAt": 123,
"publishedVersionId": "<string>",
"latestVersionNumber": 123,
"cronState": {
"lastFiredAt": 123,
"nextDueAt": 123
}
},
"versionId": "<string>"
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}Crea una versión a partir del borrador actual. Las ejecuciones usan la última versión publicada.
Respuesta exitosa (
Guarda
Endpoint
POST /workflows/{workflowId}/publish
Ejemplo de solicitud
curl -X POST "https://api.insuranceboosters.com/api/v1/workflows/<workflow-id>/publish" \
-H "x-ib-api-key: TU_API_KEY"
Respuesta exitosa (200)
{
"workflow": {
"id": "<workflow-id>",
"name": "Notificar pago recibido",
"status": "disabled",
"trigger": {
"type": "webhook",
"secret": "<webhook-secret>"
},
"steps": [],
"publishedVersionId": "<version-id>",
"latestVersionNumber": 1,
"createdAt": 1720000000000,
"lastUpdatedAt": 1720000000000
},
"versionId": "<version-id>"
}
versionId si necesitas auditar qué definición usó cada ejecución.
Errores frecuentes
| HTTP | Qué significa | Qué hacer |
|---|---|---|
401 | API key inválida o faltante. | Verifica x-ib-api-key. |
404 | La automatización no existe. | Confirma workflowId. |
Was this page helpful?
Publicar automatización
curl --request POST \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish \
--header 'x-ib-api-key: <api-key>'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish"
headers = {"x-ib-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish';
const options = {method: 'POST', headers: {'x-ib-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
.header("x-ib-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-ib-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ib-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")
.post(null)
.addHeader("x-ib-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-ib-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/publish' -Method POST -Headers $headers{
"workflow": {
"id": "<string>",
"name": "<string>",
"status": "enabled",
"trigger": {
"type": "webhook",
"secret": "<string>"
},
"steps": [
{
"actionKey": "browser.use",
"task": "<string>",
"resultSchema": {
"type": "object"
},
"wait": {
"initialDelaySeconds": 30,
"pollIntervalSeconds": 15,
"timeoutSeconds": 3600
},
"id": "<string>",
"name": "<string>"
}
],
"createdAt": 123,
"lastUpdatedAt": 123,
"publishedVersionId": "<string>",
"latestVersionNumber": 123,
"cronState": {
"lastFiredAt": 123,
"nextDueAt": 123
}
},
"versionId": "<string>"
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}
