curl --request POST \
--url https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8",
"phone": "+573001234567",
"email": "john.doe@example.com"
},
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"stageId": "stage-new",
"name": "Acme renewal 2027",
"externalId": "ERP-OPP-981",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15",
"segment": "Retail"
}
}
'import requests
url = "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records"
payload = {
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8",
"phone": "+573001234567",
"email": "john.doe@example.com"
},
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"stageId": "stage-new",
"name": "Acme renewal 2027",
"externalId": "ERP-OPP-981",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15",
"segment": "Retail"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contact: {
id: '4e362e2b-67b2-4a7e-a9df-e9ecf9141be8',
phone: '+573001234567',
email: 'john.doe@example.com'
},
pipelineId: '5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10',
stageId: 'stage-new',
name: 'Acme renewal 2027',
externalId: 'ERP-OPP-981',
values: {budget: 15000000, closeDate: '2026-12-15', segment: 'Retail'}
})
};
fetch('https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contact' => [
'id' => '4e362e2b-67b2-4a7e-a9df-e9ecf9141be8',
'phone' => '+573001234567',
'email' => 'john.doe@example.com'
],
'pipelineId' => '5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10',
'stageId' => 'stage-new',
'name' => 'Acme renewal 2027',
'externalId' => 'ERP-OPP-981',
'values' => [
'budget' => 15000000,
'closeDate' => '2026-12-15',
'segment' => 'Retail'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records"
payload := strings.NewReader("{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-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))
}HttpResponse<String> response = Unirest.post("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0d3c7f0e-5a43-5c0e-9f53-1f6a4b2e7d11",
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"pipelineVersion": 3,
"stageId": "stage-new",
"state": "OPEN",
"name": "Acme renewal 2027",
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8"
},
"source": "API",
"revision": 1,
"createdAt": "2026-11-11T15:00:00.000Z",
"updatedAt": "2026-11-11T15:00:00.000Z",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15"
},
"ownerId": null,
"externalId": "ERP-OPP-981",
"closeReason": {
"id": "reason-price",
"label": "Price too high",
"note": null
},
"closedAt": null
}Criar um registro de pipeline
Cria um registro de um contato em um pipeline, como uma oportunidade de venda.
O contato é informado por exatamente um de id, phone ou email e precisa existir: nunca é criado (404
BRIDGE_EXTERNAL_0001). pipelineId assume por padrão o pipeline padrão do workspace e stageId a
etapa inicial do pipeline. Um name ausente ou em branco assume por padrão o nome completo do contato, depois seu
celular e depois seu e-mail. Só são aceitas etapas abertas, e só atributos de escopo RECORD da
versão atual do pipeline em values (um null, um texto em branco ou uma lista vazia é omitido); cada problema
encontrado é listado em extra.errors do 422
BRIDGE_PIPELINE_0311. Quando a etapa em que o registro começa exige um contato completo (nome, sobrenome,
celular e todo atributo personalizado obrigatório do workspace), um contato incompleto falha com 422
BRIDGE_PIPELINE_0305, cujo extra.missing indica o que falta. Um segundo registro com o mesmo externalId
no pipeline falha com 409 BRIDGE_PIPELINE_0003, cujo extra.recordId é o registro existente.
Idempotency-Key é obrigatório. Repetir com a mesma chave e o mesmo corpo responde 201 com o primeiro registro e
Idempotent-Replayed: true. A mesma chave com um corpo diferente falha com 422 BRIDGE_PIPELINE_0402, e
enquanto a primeira solicitação ainda está em andamento, com 409 BRIDGE_PIPELINE_0401. Quando a solicitação falha, a chave é
liberada e pode ser reutilizada. Se a primeira solicitação foi interrompida antes de terminar, sua chave continua respondendo 409
BRIDGE_PIPELINE_0401 por até 24 horas: tente de novo com uma chave nova e envie externalId para que uma nova tentativa nunca
crie um segundo registro.
curl --request POST \
--url https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8",
"phone": "+573001234567",
"email": "john.doe@example.com"
},
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"stageId": "stage-new",
"name": "Acme renewal 2027",
"externalId": "ERP-OPP-981",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15",
"segment": "Retail"
}
}
'import requests
url = "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records"
payload = {
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8",
"phone": "+573001234567",
"email": "john.doe@example.com"
},
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"stageId": "stage-new",
"name": "Acme renewal 2027",
"externalId": "ERP-OPP-981",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15",
"segment": "Retail"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contact: {
id: '4e362e2b-67b2-4a7e-a9df-e9ecf9141be8',
phone: '+573001234567',
email: 'john.doe@example.com'
},
pipelineId: '5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10',
stageId: 'stage-new',
name: 'Acme renewal 2027',
externalId: 'ERP-OPP-981',
values: {budget: 15000000, closeDate: '2026-12-15', segment: 'Retail'}
})
};
fetch('https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contact' => [
'id' => '4e362e2b-67b2-4a7e-a9df-e9ecf9141be8',
'phone' => '+573001234567',
'email' => 'john.doe@example.com'
],
'pipelineId' => '5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10',
'stageId' => 'stage-new',
'name' => 'Acme renewal 2027',
'externalId' => 'ERP-OPP-981',
'values' => [
'budget' => 15000000,
'closeDate' => '2026-12-15',
'segment' => 'Retail'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records"
payload := strings.NewReader("{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-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))
}HttpResponse<String> response = Unirest.post("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact\": {\n \"id\": \"4e362e2b-67b2-4a7e-a9df-e9ecf9141be8\",\n \"phone\": \"+573001234567\",\n \"email\": \"john.doe@example.com\"\n },\n \"pipelineId\": \"5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10\",\n \"stageId\": \"stage-new\",\n \"name\": \"Acme renewal 2027\",\n \"externalId\": \"ERP-OPP-981\",\n \"values\": {\n \"budget\": 15000000,\n \"closeDate\": \"2026-12-15\",\n \"segment\": \"Retail\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0d3c7f0e-5a43-5c0e-9f53-1f6a4b2e7d11",
"pipelineId": "5d0b8f8e-3c1a-4a4e-9a57-2f6f3e1c9b10",
"pipelineVersion": 3,
"stageId": "stage-new",
"state": "OPEN",
"name": "Acme renewal 2027",
"contact": {
"id": "4e362e2b-67b2-4a7e-a9df-e9ecf9141be8"
},
"source": "API",
"revision": 1,
"createdAt": "2026-11-11T15:00:00.000Z",
"updatedAt": "2026-11-11T15:00:00.000Z",
"values": {
"budget": 15000000,
"closeDate": "2026-12-15"
},
"ownerId": null,
"externalId": "ERP-OPP-981",
"closeReason": {
"id": "reason-price",
"label": "Price too high",
"note": null
},
"closedAt": null
}Cabeçalhos
Uma chave que você escolhe para cada registro a criar, como o id de operação do seu sistema. Envie a mesma chave ao repetir a solicitação: por 24 horas ela responde com o registro que a primeira solicitação criou.
1 - 255"erp-opp-981-create"
Parâmetros de caminho
Corpo
Corpo da solicitação para criar um registro de pipeline.
Valores dos atributos do registro, indexados por id de atributo. Só são aceitos atributos de escopo RECORD da versão atual do pipeline, cada um verificado conforme seu tipo (TEXT até 2000 caracteres); um valor null, um texto em branco e uma lista vazia são omitidos.
{
"budget": 15000000,
"closeDate": "2026-12-15",
"segment": "Retail"
}
Resposta
O registro foi criado, ou uma solicitação anterior com a mesma chave o criou.
Um registro de um pipeline, como uma oportunidade de venda de um contato.
Esta página foi útil?

