# Set global template (/en/api-reference/api-ref/rtmp-gateway/set-global-template)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Sets a global Media Gateway flow configuration template.

- OpenAPI: /openapi/media-gateway/media-gateway.en.yaml
- Operation ID: set-media-gateway-global-template
- Method: PUT
- Path: /{region}/v1/projects/{appId}/rtls/ingress/appconfig

## Servers

- https://api.agora.io

## Parameters

- `region` (path, required) - Region for the streaming key or stream. Supported values are `na` for North America, `eu` for Europe, `ap` for Asia except mainland China, and `cn` for mainland China.
- `appId` (path, required) - The app ID provided by Agora to each developer. After creating a project in Agora Console, you can get an app ID. The app ID is a unique identifier for a project.
- `X-Request-ID` (header, optional) - The UUID (Universally Unique Identifier) of the request. After you pass in this field, the Agora server returns this field in the response header. It is recommended to assign `X-Request-ID` a value. If omitted, the Agora server automatically generates a UUID and returns it.

## Request body

- `settings` (object, required)
  - `settings.defaultStreamTemplate` (string, required) - The flow configuration template ID to apply globally.
No schema.

## Responses

### 200

The request succeeded and set the global template.

- `status` (string) - The status of this request. `success` means the request succeeds.
No schema.
### 401

The request failed. A `401 (Unauthorized)` response status code means the request is not authorized.

- `status` (string) - Request status.
No schema.
- `message` (string) - Description of why the request failed.
No schema.
### default

The request failed. A `401 (Unauthorized)` response status code means the request is not authorized.

- `status` (string) - Request status.
No schema.
- `message` (string) - Description of why the request failed.
No schema.
