---
title: "Update AI content by contentId"
url: https://docs.gleap.ai/en/reference/rest-api/update-by-content-id
method: PUT
path: "/aicontent/{contentId}"
api: "API Reference"
tag: "AI content"
operationId: "UpdateByContentId"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Update AI content by contentId

`PUT https://api.gleap.io/v3/aicontent/{contentId}`

Update an AI content entry by its contentId. If no entry with that contentId exists, one is created (upsert).

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Path parameters

- `contentId` (string, required)

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `title` (string, required)
- `content` (any, required)
- `type` (string, required)
- `batchId` (string)
- `readMoreUrl` (string)
- `readMoreLabel` (string)

## Example request

```bash
curl --request PUT \
  --url 'https://api.gleap.io/v3/aicontent/{contentId}' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<title>",
  "content": null,
  "type": "<type>"
}'
```

## Responses

### 200 (`application/json`)

Ok
