---
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`

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

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
