- 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.
The HTTP method used by the data connector.
The URL of the external API endpoint. Supports template variables like {{order_id}}.
The audience types this connector targets.
[ "leads", "users" ]
The input parameters accepted by this data connector. Replaces all existing inputs.
Whether OTP authentication is enabled for this connector.
Whether to validate missing attributes before execution.
A sample JSON response from the external API. Auto-generates response_fields and sets configuration_response_type to mock_response_type.
{ "order": { "id": 12345, "status": "shipped" } }
IDs of authentication tokens to attach to this data connector. An empty array removes all tokens.
[ "1234", "5678" ]
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.
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.
{ "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", "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, "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" } }