> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ordergroove.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ordergroove.ferndocs.com/_mcp/server.

# Create or Update by Experience Name

PUT https://restapi.ordergroove.com/communications/experiencesettings/{experience}/update/
Content-Type: application/json

If an Experience by this name already exists in the merchant’s system, this endpoint activates or deactivates it; otherwise a new Experience will be created with the name input.

Reference: https://ordergroove.ferndocs.com/reference/rest-rpc-api/communications/create-or-update-by-experience-name

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `experience` (string, required) — Options for experience name: reorder, reorder-with-confirmation, sms-promotions, subscription-management

### Body (application/json)

This endpoint expects an object.

- `merchant` (string, required) — Merchant ID
- `customer` (string, required) — Customer ID
- `enabled` (string, required) — Boolean response: Is this experience activated?

## Response

### 200

200

- `public_id` (string, optional)
- `merchant` (string, optional)
- `customer` (string, optional)
- `experience` (string, optional)
- `enabled` (boolean, optional, default: true)

## Errors

### 400 Bad Request Error

400

- `detail` (string, optional)

### 403 Forbidden Error

403

- `detail` (string, optional)

### 404 Not Found Error

404

- `detail` (string, optional)

## Examples

**Request**

```json
{
  "merchant": "string",
  "customer": "string",
  "enabled": "string"
}
```

**Response**

```json
{
  "public_id": "f9cb2f93e1c845eb9de9eff46ddb3cbf",
  "merchant": "275dbe1d77f34aca968fb75a8dbb4c82",
  "customer": "11100-C01",
  "experience": "reorder",
  "enabled": true
}
```

**SDK Code**

```python Result
import requests

url = "https://restapi.ordergroove.com/communications/experiencesettings/experience/update/"

payload = {
    "merchant": "string",
    "customer": "string",
    "enabled": "string"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Result
const url = 'https://restapi.ordergroove.com/communications/experiencesettings/experience/update/';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"merchant":"string","customer":"string","enabled":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Result
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://restapi.ordergroove.com/communications/experiencesettings/experience/update/"

	payload := strings.NewReader("{\n  \"merchant\": \"string\",\n  \"customer\": \"string\",\n  \"enabled\": \"string\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Result
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/communications/experiencesettings/experience/update/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"merchant\": \"string\",\n  \"customer\": \"string\",\n  \"enabled\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java Result
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://restapi.ordergroove.com/communications/experiencesettings/experience/update/")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"merchant\": \"string\",\n  \"customer\": \"string\",\n  \"enabled\": \"string\"\n}")
  .asString();
```

```php Result
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://restapi.ordergroove.com/communications/experiencesettings/experience/update/', [
  'body' => '{
  "merchant": "string",
  "customer": "string",
  "enabled": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Result
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/communications/experiencesettings/experience/update/");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"merchant\": \"string\",\n  \"customer\": \"string\",\n  \"enabled\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Result
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "merchant": "string",
  "customer": "string",
  "enabled": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/communications/experiencesettings/experience/update/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```