Start keyword optimization

put /text/Keywords/Optimization
This endpoint starts a new keyword optimization for a specific record in the store. The optimization process analyzes the text's performance, suggesting keywords, ranking them, and providing potential optimization steps for better performance.

Requirements

Authentication Required
Bearer access_token
Request Headers
Authorization: Bearer access_token
Content-Type: application/json
Parameter Name Type Description
storeId string, required The store identifier. Defaults to "default" if not provided.
type string, required Specifies the type of entity, which can be either  Product or Category.
recordId string, required The ID of the record to update.
languageCode string, optional

The language in ISO 639-1 country/variant identifier (e.g., "en", "en-US"). Defaults to "en" if not provided.

ipAddress string, optional The IP address of the client making the request.
url string, optional A URL associated with the record.
name string, optional The name of the record.
imageId array, optional The ID of the associated image.
intents array, optional A list of intents associated with the record.
seedKeywords array, optional A list of seed keywords for optimization.
products array, optional List of product names to be used for category keyword generation. This parameter allows you to supply representative product names that the system can analyze when building keyword sets for a category.
countryCode string, optional

The country code associated with the operation, in ISO 3166 alpha-2 (two-letter) code (e.g., "US", "DK").

clusters integer, optional The number of clusters for optimization.
triggers string, optional

Specifies the action to perform when the trigger condition (defined in triggers.option and triggers.value) is met. This allows you to control whether keywords or texts are flagged, rewritten, or fully automated once the trigger event occurs. Allowed values:

  • FlagForRewrite – Marks the keyword or text for rewrite but does not automatically rewrite it. This is useful for workflows where a manual review or approval process is required before updating live content.

  • AutomaticRewrite – Automatically rewrites the text when the trigger condition is satisfied. The updated content is generated and stored, but publishing may still require a manual step depending on your setup.

  • FullAutomation – Automatically rewrites the text and publishes it immediately once the trigger condition is met. This option is intended for fully hands-off automation pipelines where new content can go live without manual intervention.

Notes:

  • Use FlagForRewrite if you want more editorial control.
  • Use AutomaticRewrite for semi-automated workflows where content generation is automatic, but publishing is still controlled.
  • Use FullAutomation only when you trust the automated process to push changes live without human review.

Example API Request

//https://api-eu.writetext.ai/text/Keywords/Optimization

Response

200
400
404
500
//The keyword optimization data has been successfully updated.
//This error occurs when the request is invalid or contains missing/incorrect fields.
//The specified record or related resource (e.g., storeId, recordId, etc.) could not be found.
//The server encountered an error when processing the request.