AI

Add AI Prompt

Required scopes: ai.prompt (Read and Write).

post/users/{userId}/ai/prompts

Request

Path parameters

userIdinteger required

User Identifier

Request body

namestring required

AI prompt name

action'pre_translate' | 'qa_check' required
aiProviderIdinteger

AI Provider identifier. Get via List AI Providers

aiModelIdstring

Ai Model id. Get via List AI Provider Models

isEnabledboolean

If aiProviderId or aiModelId is not set, default value would be false

enabledProjectIdsinteger[]

Array of project ids. Get via List Projects

Example request

{
  "name": "Pre-translate prompt",
  "aiModelId": "gpt-5.4",
  "enabledProjectIds": [
    23
  ],
  "config": {
    "customPlaceholders": [
      "%custom:companyDescription%"
    ],
    "snippets": [
      "%custom:companyDescription%"
    ],
    "otherLanguageTranslations": {
      "languageIds": [
        "uk"
      ]
    }
  }
}

Response

AI prompt was added successfully

Example response

{
  "data": {
    "id": 2,
    "name": "Pre-translate prompt",
    "action": "pre_translate",
    "aiProviderId": 2,
    "aiModelId": "gpt-5.4",
    "enabledProjectIds": [
      1
    ],
    "config": {
      "customPlaceholders": [
        "%custom:companyDescription%"
      ],
      "snippets": [
        "%custom:companyDescription%"
      ],
      "otherLanguageTranslations": {
        "languageIds": [
          "uk"
        ]
      }
    },
    "createdBy": 123,
    "updatedBy": 456,
    "lastUsedBy": 789,
    "lastUsedAt": "2019-09-25T14:30:00+00:00",
    "usageCount": 42,
    "createdAt": "2019-09-20T11:11:05+00:00",
    "updatedAt": "2019-09-20T12:22:20+00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.