---
title: "For creating or updating log forwarding configuration"
method: PUT
path: "/log-forwarding/configurations"
tags: ["Configuration"]
---

# For creating or updating log forwarding configuration

`PUT /log-forwarding/configurations`

Log forwarding configuration is used to forward logs to external services

## Request body

- ConfigurationApiUpsertLogForwardingConfigurationRequestBody
  - `type` 'SPLUNK' | 'NEWRELIC' | 'DATADOG' | 'SUMOLOGIC' | 'LOGZIO' | 'CORALOGIX' | 'GOOGLE_CLOUD_LOGGING' | 'GRAFANA_LOKI' | 'CLOUDWATCH' | 'S3', required
  - `value` object, required — A JSON representation of the log forwarding configuration. - For SPLUNK type use: { url: "your-url", token: "your-token", index: "your-index" } - For NEWRELIC type use: { url: "your-url", apiKey: "your-api-key" } - For DATADOG type use: { host: "your-host", port: "your-port (number)", apiKey: "your-api-key" } - For SUMOLOGIC type use: { url: "your-url" } - For LOGZIO type use: { host: "your-host", token: "your-token", protocol: "http or https", port: "your-port (number)" } - For CORALOGIX type use: { host: "your-host", token: "your-token", appName: "your-app-name", subSystemName: "your-subsystem-name" } - For GOOGLE_CLOUD_LOGGING type use: { projectId: "your-project-id", logName: "your-log-name", serviceAccountCredentials: "your-service-account-credentials" } - For GRAFANA_LOKI type use: { host: "your-host", requiresAuthentication: "true or false", username: "your-username", password: "your-password" } - For CLOUDWATCH type use: { roleArn: "your-role-arn", awsRegion: "your-region", sessionDuration?: "session-duration-in-seconds", logGroupNamePrefix?: "your-log-group-prefix" } - For S3 type use: { bucketName: "your-bucket-name", awsRegion: "your-aws-region", roleArn: "your-role-arn", bucketPath?: "your-bucket-path", sessionDuration?: "session-duration-in-seconds" }
  - `auditLogForwarding` boolean, required
  - `deploymentLogForwarding` boolean, required
  - `encryptionMethod` 'kms'
  - `organizationId` string, required
  - `projectId` string

## Response `200`

- ConfigurationApiUpsertLogForwardingConfigurationResponse
  - `type` 'SPLUNK' | 'NEWRELIC' | 'DATADOG' | 'SUMOLOGIC' | 'LOGZIO' | 'CORALOGIX' | 'GOOGLE_CLOUD_LOGGING' | 'GRAFANA_LOKI' | 'CLOUDWATCH' | 'S3', required
  - `value` unknown, required
  - `auditLogForwarding` boolean, required
  - `deploymentLogForwarding` boolean, required
  - `id` string, required
  - `name` string, required
  - `organizationId` string, required
  - `projectId` string
  - `updatedAt` string, date-time, required
  - `createdByUser` User
    - `email` string
    - `user_id` string
    - `created_at` string
    - `updated_at` string
    - `app_metadata` AppMetadata
      - `organizations` UserOrganization[]
        - `id` string, required
        - `role` string
        - `name` string
      - `isApiKey` boolean
      - `isAutogeneratedTerraformDeployer` boolean
      - `apiKeyType` 'oidc'
      - `createdBy` string
      - `organizationId` string
      - `isSystemUser` boolean
      - `readOnly` boolean
    - `picture` string
    - `name` string
    - `last_login` string
    - `given_name` string
    - `family_name` string
    - `blocked` boolean

---

[API](https://skmtc.net/envzero/apis/env0-api.md) · [All operations](https://skmtc.net/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/envzero/env0-api/versions/513441cbe9dc/schema)
