Skip to content

Update Data Connector Request

Update an existing data connector. All fields are optional — only provided fields will be updated. Set state to live or draft to change the connector's state.

namestring

The name of the data connector.

Example:"Updated Connector Name"
descriptionstring

A description of what this data connector does.

Example:"Updated description"
internal_descriptionstring

The internal description of the data connector. If omitted, it keeps its current value, unless the connector has no internal description yet, in which case it is set to the connector's description.

statestring

The desired state of the connector.

Enum:"draft""live"
http_methodstring

The HTTP method used by the data connector.

Enum:"get""post""put""delete""patch"
Example:"post"
urlstring

The URL of the external API endpoint. Supports template variables like {{order_id}}.

Example:"https://api.example.com/orders/{{order_id}}/status"
bodystring

The request body template. Supports template variables.

direct_fin_usageboolean

Whether this connector is used directly by Fin.

Example:false
audiencesArray of strings

The audience types this connector targets.

Items Enum:"leads""users""visitors"
Example:
[ "leads", "users" ]
headersArray of objects

HTTP headers to include in the request. Don't put credentials such as API keys here: header values are recorded unmasked in the connector's execution logs, except Authorization, which is always masked. Attach a stored credential with token_ids instead (see Create an auth token). Its value is stored encrypted, masked in execution logs, and never returned.

data_inputsArray of objects

The input parameters accepted by this data connector. Replaces all existing inputs.

customer_authenticationboolean

Whether OTP authentication is enabled for this connector.

Example:false
bypass_authenticationboolean

Whether authentication is bypassed for this connector.

Example:false
enforce_authboolean

Whether authentication is enforced. On workspaces where this is supported, it takes precedence over customer_authentication and bypass_authentication when sent together, and setting it to false disables OTP.

validate_missing_attributesboolean

Whether to validate missing attributes before execution.

Example:true
mock_responseobject

A sample JSON response from the external API. Auto-generates response_fields and sets configuration_response_type to mock_response_type.

Example:
{ "order": { "id": 12345, "status": "shipped" } }
token_idsArray of strings

IDs of authentication tokens to attach to this data connector. An empty array removes all tokens.

Example:
[ "1234", "5678" ]
data_transformation_typestring or null

The type of data transformation to apply to the response. Setting this to code_block_transformation requires transform_code_block to be set on this request, or already configured on the connector.

Enum:"full_access""redacted_access""code_block_transformation"
Example:"code_block_transformation"
transform_code_blockobject or null

The code block to use when data_transformation_type is code_block_transformation (on this request, or already configured on the connector). For a live connector already in code mode, changing code runs the connector's code block test — against its mock response, or its last successful test response — before saving; if the test fails, or can't start, the request fails with a 422 and nothing is saved. Draft connectors are not tested. null is the same as omitting this field.

Example:
{ "code": "def transform(response):\n return {\"status\": response[\"order_status\"]}\n\nreturn transform(inputs['data'])\n", "language": "python" }
{ "name": "Updated Connector Name", "description": "Updated description", "internal_description": "string", "state": "draft", "http_method": "post", "url": "https://api.example.com/orders/{{order_id}}/status", "body": "string", "direct_fin_usage": false, "audiences": [ "leads", "users" ], "headers": [ { … } ], "data_inputs": [ { … } ], "customer_authentication": false, "bypass_authentication": false, "enforce_auth": true, "validate_missing_attributes": true, "mock_response": { "order": { … } }, "token_ids": [ "1234", "5678" ], "data_transformation_type": "code_block_transformation", "transform_code_block": { "code": "def transform(response):\n return {\"status\": response[\"order_status\"]}\n\nreturn transform(inputs['data'])\n", "language": "python" } }