Update a Prompt
Update a prompt's properties. Only provided fields will be updated. Toggling enabled schedules or unschedules the recurring run job.
Needs write access. About keys
Request
curl -X PATCH "https://app.vyingfor.com/api/v1/prompts/{promptId}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"value":"best project management tools for small teams"}'Parameters
| Name | In | Type | Description |
|---|---|---|---|
promptId required | Path | string | The ID of the prompt to update. |
Body
| Field | Type | Description |
|---|---|---|
value | string | The prompt text. |
enabled | boolean | Whether the prompt is enabled. |
tags | string[] | User-defined tags for categorizing this prompt. |
parentId | string or null | Makes the prompt a variant of another prompt in the same brand, taking its own variants with it. Naming one of its own variants swaps the two. Null makes a variant stand on its own. |
country | string or null | Country to ask the prompt from. ISO 3166-1 alpha-2 country, from the supported list in the countries and languages guide. Null follows the brand. |
language | string or null | Language the prompt is written in. ISO 639-1 language, from the supported list in the countries and languages guide. Null follows the brand. Changing |
Response
200 Prompt updated successfully
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the prompt. |
brandId | string | Brand identifier this prompt belongs to. |
value | string | The actual prompt text. |
parentId | string or null | Set on a variant: the prompt whose question this one asks in other words. Each variant is tracked and billed as its own prompt. Null on a prompt that isn't a variant. Variants are one level deep, and when a parent is disabled or deleted its oldest enabled variant becomes the parent of the rest. |
country | string or null | The country this prompt sets for itself. Null follows the brand's country. |
language | string or null | The language this prompt sets for itself. Null follows the brand's language. |
effectiveCountry | string | The country the prompt is asked from: its own |
effectiveLanguage | string | The language the prompt is written in: its own |
enabled | boolean | Whether the prompt is currently enabled. |
tags | string[] | User-defined tags for categorizing this prompt. |
systemTags | string[] | Auto-computed system tags (e.g., 'branded', 'unbranded'). Read-only. |
createdAt | string | Timestamp when the prompt was created. |
updatedAt | string | Timestamp when the prompt was last updated. |
premiumModels | string[] | Models this prompt is tracked on grounded. Each entry spends one premium pairing. |
Errors
400Invalid request data401Authentication required403The key is valid but doesn't have the access this request needs.404Resource not found409A limit was reached: the number of questions or markets a brand can have.429Per-key rate limit exceeded.500Internal server error