Automatizaciones
Actualizar automatización
Actualiza el borrador de una automatización. Los cambios no afectan ejecuciones hasta publicar.
PUT
/
workflows
/
{workflowId}
Actualizar automatización
curl --request PUT \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '{}'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}"
payload = {}
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}', 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}';
const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-ib-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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 mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")
.put(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = [] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")!
var request = URLRequest(url: url)
request.httpMethod = "PUT"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
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>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{}'{
"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
}
}{
"error": "<string>"
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}Actualiza el borrador. Para que las ejecuciones usen los cambios, vuelve a publicar.
Respuesta exitosa (
Devuelve la automatización actualizada con la misma forma que en Crear automatización.
Endpoint
PUT /workflows/{workflowId}
Body
Envía solo los campos que quieras cambiar:name, status, trigger o steps.
Ejemplo de solicitud
curl -X PUT "https://api.insuranceboosters.com/api/v1/workflows/<workflow-id>" \
-H "Content-Type: application/json" \
-H "x-ib-api-key: TU_API_KEY" \
-d '{
"name": "Notificar pago recibido (actualizado)",
"steps": [
{
"name": "Avisar sistema externo",
"actionKey": "http.request",
"input": {
"method": "POST",
"url": "https://ejemplo.com/hooks/pago",
"headers": { "Content-Type": "application/json" },
"body": {
"referencia": "{{trigger.body.referencia}}"
}
}
}
]
}'
Respuesta exitosa (200)
Devuelve la automatización actualizada con la misma forma que en Crear automatización.
Errores frecuentes
| HTTP | Qué significa | Qué hacer |
|---|---|---|
400 | El body no cumple el esquema. | Revisa trigger y steps. |
401 | API key inválida o faltante. | Verifica x-ib-api-key. |
404 | La automatización no existe. | Confirma workflowId. |
Authorizations
API key emitida por Insurance Boosters.
Path Parameters
Identificador de la automatización.
Body
application/json
Response
Borrador actualizado.
Available options:
enabled, disabled - Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
Actualizar automatización
curl --request PUT \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '{}'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}"
payload = {}
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}', 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}';
const options = {
method: 'PUT',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-ib-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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 mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")
.put(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = [] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}")!
var request = URLRequest(url: url)
request.httpMethod = "PUT"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
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>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{}'{
"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
}
}{
"error": "<string>"
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}
