Update transformer
PUT/accounts/{account_id}/logpush/transformers/{transformer_id}
Updates an existing custom log transformer. When code is provided, the SQL query is validated and a new version is created. When code is omitted, only the name and description are updated. Omitting description clears the existing description.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Path Parameters
Body ParametersJSON
Update transformer
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logpush/transformers/$TRANSFORMER_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"name": "redact-pii",
"code": "SELECT ClientIP, RayID FROM http_requests",
"description": "Redacts PII fields from HTTP request logs."
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": 42,
"associated_jobs": [
{
"id": 123,
"name": "s3-export",
"object_tag": "023e105f4ecef8ad9ca31a8372d0c353",
"object_type": "zone"
}
],
"created_at": "2026-08-01T12:00:00Z",
"dataset": "http_requests",
"description": "Redacts PII fields from HTTP request logs.",
"name": "redact-pii",
"updated_at": "2026-08-10T15:30:00Z"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": 42,
"associated_jobs": [
{
"id": 123,
"name": "s3-export",
"object_tag": "023e105f4ecef8ad9ca31a8372d0c353",
"object_type": "zone"
}
],
"created_at": "2026-08-01T12:00:00Z",
"dataset": "http_requests",
"description": "Redacts PII fields from HTTP request logs.",
"name": "redact-pii",
"updated_at": "2026-08-10T15:30:00Z"
}
}