---
title: "Save AI provider configuration"
method: PUT
path: "/api/v1/ai/completions/config"
tags: ["AI"]
---

# Save AI provider configuration

`PUT /api/v1/ai/completions/config`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/ai/completions/config`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/ai/completions/config/put.ts> (a function with typed inputs; its response is checked against the schema)

Saves the providerConfig JSON for the target site. Accepts an optional siteId query parameter (site identifier / UUID, or the literal SYSTEM_HOST). Hostname values are not supported — use the site identifier. When siteId is omitted, saves to the site derived from the HTTP Host header. An unresolvable siteId returns 400. Credential fields set to "*****" are preserved from the existing stored configuration. Requires CMS admin.

## Query parameters

- `siteId` string

## Request body

- string

## Response `200`

Configuration saved successfully

## Other responses

- `400`: Missing or invalid request body, or site not found
- `403`: Forbidden - requires CMS admin or access denied to site
- `500`: Internal server error

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/ai/completions/config/put.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
