---
title: Update Prompt (partial)
description: Update Prompt (partial)
product: general
token_estimate: 1380
---
# Update Prompt (partial)

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Update Prompt (partial)

**PATCH** `/console/v1/prompts/{id}`

Full URL: `https://statsigapi.net/console/v1/prompts/{id}`

Update Prompt (partial)

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id (path) | string | Yes | — | id |

## Body (application/json)

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| description | string | No | — | Updated description. Constraints: max length: 1000 |
| targetApps | oneOf | No | — | Updated list of target app names. Constraints: string, string[] |
| team | string | No | — | Updated team name. |
| teamID | string | No | — | Updated team ID. |

## Response (application/json)

**200** — Update Prompt Response

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | — |
| data.id | string | Yes | — | ID |
| data.name | string | No | — | The gate display name Constraints: min length: 3, max length: 100, pattern: ^[a-zA-Z0-9_\-. ]*$ |
| data.idType | string | No | — | — |
| data.description | string | Yes | — | Constraints: max length: 1000 |
| data.lastModifierID | string | Yes | — | ID of the last modifier. Constraints: nullable |
| data.lastModifiedTime | number | Yes | — | Time of the last modification. Constraints: format: double, nullable |
| data.lastModifierEmail | string | Yes | — | Email of the last modifier. Constraints: nullable |
| data.lastModifierName | string | Yes | — | Name of the last modifier. Constraints: nullable |
| data.creatorID | string | No | — | Constraints: nullable |
| data.createdTime | number | Yes | — | Timestamp when the entity was created. Constraints: format: double |
| data.creatorName | string | Yes | — | Name of the creator. Constraints: nullable |
| data.creatorEmail | string | No | — | Constraints: nullable |
| data.tags | string[] | No | — | — |
| data.targetApps | string[] | No | — | List of target applications associated with this configuration. |
| data.holdoutIDs | string[] | No | — | Holdouts applied to this configuration. |
| data.team | string | No | — | Constraints: nullable |
| data.teamID | string | No | — | Constraints: nullable |
| data.version | number | No | — | Version number Constraints: format: double |

```json
{
  "message": "string",
  "data": {
    "id": "string",
    "name": "string",
    "idType": "string",
    "description": "string",
    "lastModifierID": "string",
    "lastModifiedTime": 0,
    "lastModifierEmail": "string",
    "lastModifierName": "string",
    "creatorID": "string",
    "createdTime": 0,
    "creatorName": "string",
    "creatorEmail": "string",
    "tags": [
      "string"
    ],
    "targetApps": [
      "string"
    ],
    "holdoutIDs": [
      "string"
    ],
    "team": "string",
    "teamID": "string",
    "version": 0
  }
}
```

## Code samples

### cURL

```bash
curl -X PATCH "https://statsigapi.net/console/v1/prompts/{id}" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.patch(
    "https://statsigapi.net/console/v1/prompts/{id}",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/prompts/{id}", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/prompts/{id}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("PATCH", "https://statsigapi.net/console/v1/prompts/{id}", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/prompts/{id}"))
      .method("PATCH", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/prompts/{id}")
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

