---
title: "Update source template (deprecated)."
method: POST
path: "/v1/sourceTemplate/{id}"
tags: ["sourceTemplateManagementExternal"]
deprecated: true
---

# Update source template (deprecated).

`POST /v1/sourceTemplate/{id}`

> **Deprecated.**

Update a source template with the given identifier.

**DEPRECATED**: This endpoint will be removed soon. Please use POST /v1/sourceTemplates/{id} instead.

## Path parameters

- `id` string, required

## Request body

- SourceTemplateRequest — request body for creating source template.
  - `schemaRef` SchemaRef, required — schema reference for source template.
    - `type` string, required — type of source template.
  - `inputJson` object, required — inputJson of source template
    - `name` string, required — name of source template.
    - `receivers` object, required — receiver information of source template
    - `description` string — description of source template
    - `processors` object — processors for source template
  - `selector` Selector — Agent selector conditions
    - `tags` array[] — tags filter for agents
      - OtTag[]
        - `key` string, required — key of the given tag.
        - `values` string[], required — values of the given tag.
    - `names` string[] — names to select custom agents
  - `isEnabled` boolean — Indicates whether the source template is enabled - **Create operation:** Defaults to `true` (the template is enabled when created). - **Update operation:** If omitted, the existing status is preserved.

## Response `200`

Update source template response

- SourceTemplateDefinition — response definition of source template.
  - `schemaRef` SchemaRef — schema reference for source template.
    - `type` string, required — type of source template.
  - `id` string — id of source template.
  - `inputJson` object — inputJson of source template
  - `config` string — configuration of source template
  - `selector` Selector — Agent selector conditions
    - `tags` array[] — tags filter for agents
      - OtTag[]
        - `key` string, required — key of the given tag.
        - `values` string[], required — values of the given tag.
    - `names` string[] — names to select custom agents
  - `totalCollectorLinked` integer — count of total collector linked with this source template.
  - `createdAt` string, date-time — Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `modifiedAt` string, date-time — Modification timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `createdBy` string — Id of the user who created source template
  - `modifiedBy` string — Id of the user who last modified the source template
  - `status` 'enable' | 'disable' — Status of Source template
  - `isEnabled` boolean — A boolean parameter to get if the source template is enabled.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/versions/18a824df1e78/schema)
