Create Connector
POSThttps://api.confident-ai.com/v2/forwarding-connectors
Creates a forwarding connector in your Confident AI project and returns its id. Confident AI then forwards traces from the environments you selected to your OTLP/HTTP collector, sending the headers you supplied with every batch. Header values are stored write-only: they are masked on every read, so keep your own copy.
curl -X POST "https://api.confident-ai.com/v2/forwarding-connectors" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme OTLP collector",
"endpoint": "https://otlp.acme-observability.com/v1/traces",
"headers": [
{
"key": "Authorization",
"value": "Bearer sk-live-a1b2c3"
}
],
"environments": [
"production"
],
"enabled": true
}'{
"success": true,
"data": {
"id": "<FORWARDING-CONNECTOR-ID>"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/project-settings/exports",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
namestringRequiredThe name of the connector, shown on the Confident AI platform and in forwarding failure messages.
endpointstringRequiredThe HTTPS URL of the OTLP/HTTP collector that receives the forwarded traces. It must resolve to a public address; private and loopback addresses are rejected.
headerslist of objectsThe complete set of HTTP headers to send with every forwarded batch, alongside the
Content-Type: application/x-protobufheader Confident AI sets. Omit this field to leave the stored headers untouched. When you do send it, the list replaces all stored headers, so resend every header you want to keep — including the ones whose values you read back masked, which are kept as stored.Show 2 propertiesHide 2 properties
keystringRequiredThe name of the HTTP header to send.
valuestringRequiredThe value of the header. Send a plaintext value to set or replace it, or send back the masked value you read to keep the stored one. A masked value that matches no stored header of the same name is dropped, because the original cannot be recovered from a mask.
environmentslist of enumsThe environments whose traces this connector forwards. An empty list forwards traces from every environment. Omit this field to leave the stored environments unchanged.
Show 4 enum valuesHide 4 enum values
productiondevelopmentstagingtesting
enabledbooleanWhether the connector forwards traces. Defaults to true on create; omit it on an update to leave it unchanged.
Response
Create Connector succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to a forwarding connector by its id.
Show 1 propertyHide 1 property
idstringThe id of the connector, generated by Confident AI.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.