---
updatedAt: 2026-09-07T11:13:18.000Z
agentTools:
  projectIndex: https://docs.nacelle.com/llms.txt
---

# custom schema (BETA)

The _**custom schema**_ endpoint updates a schema for an index.

* If an `indexId` field is present, the schema will be added to that index.

* If an `indexId` is not specified the schema will be added to the current active index,
  and all in progress indexes for the specified `sourceId`.

The required fields are `schema` and `normalizationPrefix`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Ingest API",
    "version": "1.0.0",
    "description": "This is the documentation for the Ingest API."
  },
  "servers": [
    {
      "url": "https://ingest.api.nacelle.com/v1/",
      "description": "Ingest API Development server"
    }
  ],
  "tags": [
    {
      "name": "entries (BETA)",
      "description": "Entry operations"
    }
  ],
  "paths": {
    "/index": {
      "get": {
        "tags": [
          "index"
        ],
        "summary": "Read indexes status",
        "description": "The _**index**_ endpoint allows checking the status of indexes for a given source.\n\nWhen errors occur during index processing, details may be provided via the `errors` field.\n",
        "parameters": [
          {
            "name": "x-nacelle-space-id",
            "in": "header",
            "description": "The unique identifier of the Nacelle space",
            "required": true,
            "schema": {
              "type": "string",
              "example": "00000000-0000-0000-0000-000000000000"
            }
          },
          {
            "name": "x-nacelle-source-id",
            "in": "header",
            "description": "The unique identifier of the source within the space",
            "required": true,
            "schema": {
              "type": "string",
              "example": "00000000-0000-0000-0000-000000000000"
            }
          },
          {
            "name": "x-nacelle-ingest-token",
            "in": "header",
            "description": "The authentication token for Nacelle Ingest",
            "required": true,
            "schema": {
              "type": "string",
              "example": "00000000-0000-0000-0000-000000000000"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Index statuses",
            "content": {
              "application/json": {
                "examples": {
                  "IndexStatuses": {
                    "summary": "Index Statuses listed",
                    "value": [
                      {
                        "indexId": "00000000-0000-0000-0000-000000000000",
                        "sourceId": "00000000-0000-0000-0000-000000000000",
                        "status": "index_complete",
                        "numEntriesCreated": 100,
                        "indexVersion": 1,
                        "createdAt": "2023-09-16T00:00:00",
                        "updatedAt": "2023-09-16T00:00:00",
                        "entryTypes": [
                          "PRODUCT",
                          "PRODUCT_CONTENT",
                          "PRODUCT_VARIANT",
                          "PRODUCT_VARIANT_CONTENT",
                          "CONTENT",
                          "COLLECTION",
                          "COLLECTION_CONTENT",
                          "PRICE_BOOK",
                          "PRICING",
                          "CUSTOM_SCHEMA"
                        ],
                        "errors": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "examples": {
                  "NotFoundExample": {
                    "summary": "Not Found",
                    "value": {
                      "reason": "Source not found."
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Error",
            "content": {
              "application/json": {
                "examples": {
                  "InternalErrorExample": {
                    "summary": "Internal Error",
                    "value": {
                      "error": "Internal Error",
                      "reason": "An internal error occurred. Please read https://docs.getnacelle.com/ for more information."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/content": {
      "put": {
        "tags": [
          "entries"
        ],
        "summary": "content",
        "description": "The `PUT` _**content**_ endpoint adds content entries to an index.\n\n* If an `indexId` field is present, the entries will be added to that index.\n\n* If an `indexId` is not specified the entries will be added to the current active index,\n  and all in progress indexes for the specified `sourceId`.\n\nRequired fields are `sourceEntryId`.\n",
        "parameters": [
          {
            "$ref": "#/paths/~1index/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1index/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1index/get/parameters/2"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "indexId": {
                    "type": "string",
                    "required": false,
                    "example": "00000000-0000-0000-0000-000000000000"
                  },
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "sourceEntryId"
                      ],
                      "properties": {
                        "sourceEntryId": {
                          "type": "string",
                          "example": "gid://shopify/Product/0000000000000"
                        },
                        "locale": {
                          "type": "string",
                          "example": "en-US"
                        },
                        "title": {
                          "type": "string",
                          "example": "My Content Title"
                        },
                        "published": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": "string",
                          "example": "blog"
                        },
                        "handle": {
                          "type": "string",
                          "example": "contentHandle"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time (ISO 8601 UTC)",
                          "example": "2023-09-16T00:00:00"
                        },
                        "updatedAt": {
                          "$ref": "#/paths/~1content/put/requestBody/content/application~1json/schema/properties/entries/items/properties/createdAt"
                        },
                        "fields": {
                          "type": "string",
                          "example": "{ \"foo\": \"bar\" }",
                          "description": "A json encoded string of custom ingestion data"
                        },
                        "isTopLevel": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "examples": {
                  "IndexCleared": {
                    "summary": "Success",
                    "value": {
                      "message": "CONTENT UPDATE: success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "examples": {
                  "BadRequestNoSourceEntryIdExample": {
                    "summary": "Bad Request (no sourceEntryId)",
                    "value": {
                      "error": "Bad Request",
                      "message": "Bad Request",
                      "errors": [
                        {
                          "sourceEntryId": null,
                          "errors": [
                            {
                              "target": {
                                "locale": "en-US"
                              },
                              "property": "sourceEntryId",
                              "children": [],
                              "constraints": {
                                "maxLength": "sourceEntryId must be shorter than or equal to 128 characters",
                                "isString": "sourceEntryId must be a string"
                              }
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "BadRequestSourceEntryIdTooLongExample": {
                    "summary": "Bad Request (sourceEntryId too long)",
                    "value": {
                      "error": "Bad Request",
                      "message": "Bad Request",
                      "errors": [
                        {
                          "sourceEntryId": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
                          "errors": [
                            {
                              "target": {
                                "locale": "en-US",
                                "sourceEntryId": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
                              },
                              "value": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
                              "property": "sourceEntryId",
                              "children": [],
                              "constraints": {
                                "maxLength": "sourceEntryId must be shorter than or equal to 128 characters"
                              }
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "BadRequestSourceEntryIdNotAStringExample": {
                    "summary": "Bad Request (sourceEntryId is not a string)",
                    "value": {
                      "error": "Bad Request",
                      "message": "Bad Request",
                      "errors": [
                        {
                          "sourceEntryId": 12345,
                          "errors": [
                            {
                              "target": {
                                "locale": "en-US",
                                "sourceEntryId": 12345
                              },
                              "value": 12345,
                              "property": "sourceEntryId",
                              "children": [],
                              "constraints": {
                                "maxLength": "sourceEntryId must be shorter than or equal to 128 characters",
                                "isString": "sourceEntryId must be a string"
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "examples": {
                  "SourceNotFoundExample": {
                    "summary": "Source Not Found",
                    "value": {
                      "message": "Source with id 00000000-0000-0000-0000-000000000000 not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "examples": {
                  "IndexNotInProgress": {
                    "summary": "Conflict: index not in progress",
                    "value": {
                      "error": "Conflict",
                      "reason": "The provided index id is invalid. No index in progress was found for the given index id."
                    }
                  },
                  "EntryTypeNotIncludedInIndex": {
                    "summary": "Conflict: entry types",
                    "value": {
                      "error": "Conflict",
                      "reason": "The provided index id can only accept entries of types: CONTENT, PRODUCT"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/paths/~1index/get/responses/500"
          }
        }
      }
    },
    "/custom-schema": {
      "put": {
        "tags": [
          "entries (BETA)"
        ],
        "summary": "custom schema (BETA)",
        "description": "The _**custom schema**_ endpoint updates a schema for an index.\n\n* If an `indexId` field is present, the schema will be added to that index.\n\n* If an `indexId` is not specified the schema will be added to the current active index,\n  and all in progress indexes for the specified `sourceId`.\n\nThe required fields are `schema` and `normalizationPrefix`.\n",
        "parameters": [
          {
            "$ref": "#/paths/~1index/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1index/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1index/get/parameters/2"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "indexId": {
                    "type": "string",
                    "required": false,
                    "example": "00000000-0000-0000-0000-000000000000"
                  },
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "schema",
                        "normalizationPrefix"
                      ],
                      "properties": {
                        "schema": {
                          "type": "string",
                          "example": "type NacelleProduct { title: String collection: NacelleCollection} type NacelleCollection { name: String products: [NacelleProduct]}"
                        },
                        "normalizationPrefix": {
                          "type": "string",
                          "example": "Nacelle"
                        },
                        "createdAt": {
                          "$ref": "#/paths/~1content/put/requestBody/content/application~1json/schema/properties/entries/items/properties/createdAt"
                        },
                        "updatedAt": {
                          "$ref": "#/paths/~1content/put/requestBody/content/application~1json/schema/properties/entries/items/properties/createdAt"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "examples": {
                  "CustomSchemaUpdated": {
                    "summary": "Success",
                    "value": {
                      "message": "CUSTOM_SCHEMA UPDATE: success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "examples": {
                  "BadRequestNoSchemaExample": {
                    "summary": "Bad Request (no schema)",
                    "value": {
                      "error": "Bad Request",
                      "message": "Bad Request",
                      "errors": [
                        {
                          "schema": null,
                          "errors": [
                            {
                              "target": null,
                              "property": "schema",
                              "children": [],
                              "constraints": {
                                "isString": "schema must be a string"
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/paths/~1content/put/responses/404"
          },
          "500": {
            "$ref": "#/paths/~1index/get/responses/500"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```