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

# Publish a catalogue Look revision

POST https://api.morphiaone.ai/v1/catalogue/looks/{look_id}/publish
Content-Type: application/json

Makes an approved look `revision` the one new try-ons render, at the
`expected_generation` you read (`409 GENERATION_CONFLICT` otherwise). A revision
that is not approved answers `409 REVISION_NOT_APPROVED`; a retired look
`409 LOOK_RETIRED`. Every dependency the revision pins must still be available:
a pinned variant that is retired, or a pinned profile that is withdrawn, answers
`400 INVALID_REQUEST` with `look_dependency_unavailable` at `applications[i]`,
and nothing moves. Publishing an earlier approved revision is rollback.
Send an `Idempotency-Key`: a retry with the same key and the same request
answers the first response, byte for byte, with `Idempotency-Replayed: true`,
so a response you did not receive is safe to retry.
Requires the `catalogue.publish` scope, which your account operator provisions; no other
catalogue scope implies it. Served only where the catalogue is enabled for your
environment.

Reference: https://docs.morphiaone.ai/api-reference/endpoints/catalogue/looks-publish

## Authentication

- `X-API-Key` header (required) — API key for one environment of your account. Keep server-side; never expose in browser clients.

## Request

### Path parameters

- `look_id` (string, required)

### Headers

- `Idempotency-Key` (string, optional, nullable)

### Body (application/json)

This endpoint expects an object.

- `expected_generation` (integer, required)
- `revision` (integer, required)

## Response

### 200

The look, rendering the published revision

- `active_revision` (integer, required, nullable)
- `availability` (enum, required)
  - Allowed values: `unpublished`, `active`, `retired`
- `created_at` (datetime, required)
- `generation` (integer, required)
- `id` (string, required)
- `latest_revision` (integer, required)
- `updated_at` (datetime, required)

## Errors

### 400 Bad Request Error

Invalid publish or Idempotency-Key

- `error` (ErrorDetail, required)

### 401 Unauthorized Error

Missing or invalid API key

- `error` (ErrorDetail, required)

### 403 Forbidden Error

API key lacks the catalogue.publish scope

- `error` (ErrorDetail, required)

### 404 Not Found Error

No such look or revision

- `error` (ErrorDetail, required)

### 409 Conflict Error

Look retired, generation stale, revision not approved, a dependency unavailable, or idempotency conflict

- `error` (ErrorDetail, required)

### 503 Service Unavailable Error

Catalogue unavailable

- `error` (ErrorDetail, required)

## Types

### ErrorDetail

- `code` (string, required)
- `message` (string, required)
- `request_id` (string, required)
- `details` (ErrorDetailDetails, optional)
- `doc_url` (string, optional, nullable)
- `retryable` (boolean, optional, nullable)

### ErrorDetailDetails

- map from string to any
- list of map from string to any

## Examples

**Request**

```json
{
  "expected_generation": 1,
  "revision": 1
}
```

**Response**

```json
{
  "active_revision": 1,
  "availability": "active",
  "created_at": "2026-10-07T10:02:14.118000Z",
  "generation": 2,
  "id": "look_1m2n4p6q8r0s2t4v6w8x0y2z4a",
  "latest_revision": 1,
  "updated_at": "2026-10-07T10:40:22.907000Z"
}
```

**SDK Code**

```python Catalogue_looksPublish_example
import requests

url = "https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish"

payload = {
    "expected_generation": 1,
    "revision": 1
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Catalogue_looksPublish_example
const url = 'https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"expected_generation":1,"revision":1}'
};

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

```go Catalogue_looksPublish_example
package main

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

func main() {

	url := "https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish"

	payload := strings.NewReader("{\n  \"expected_generation\": 1,\n  \"revision\": 1\n}")

	req, _ := http.NewRequest("POST", 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 Catalogue_looksPublish_example
require 'uri'
require 'net/http'

url = URI("https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"expected_generation\": 1,\n  \"revision\": 1\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"expected_generation\": 1,\n  \"revision\": 1\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish', [
  'body' => '{
  "expected_generation": 1,
  "revision": 1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp Catalogue_looksPublish_example
using RestSharp;

var client = new RestClient("https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"expected_generation\": 1,\n  \"revision\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Catalogue_looksPublish_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "expected_generation": 1,
  "revision": 1
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.morphiaone.ai/v1/catalogue/looks/look_id/publish")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```