# Get search profile index state

`GET /profiles/{profileId}/index-state`



[AI Search API guide](https://docs.contextual.io/tenants/tenant-apis/ai-search-api.md)

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "AI Search Api",
    "description": " ",
    "version": "1.7.5"
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "servers": [
    {
      "url": "https://ai-search.{tenantId}.my.contextual.io/api/v1",
      "variables": {
        "tenantId": {
          "default": "YOUR-TENANT-ID"
        }
      }
    }
  ],
  "paths": {
    "/profiles/{profileId}/index-state": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Get search profile index state",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchIndexState"
                }
              }
            }
          },
          "400": {
            "description": "Invalid organization or authorization context",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Search index state not found",
            "content": {}
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "SearchIndexState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "profileId": {
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "currentNamespace": {
            "type": "string",
            "minLength": 1
          },
          "nextNamespace": {
            "type": "string",
            "minLength": 1
          },
          "currentGeneration": {
            "type": "object",
            "properties": {
              "generationId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,64}$"
              },
              "embedderModel": {
                "type": "string",
                "enum": [
                  "voyage-4-lite",
                  "voyage-4",
                  "voyage-4-large"
                ]
              },
              "dimensions": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "functionalHash": {
                "type": "string",
                "pattern": "^fh1:[a-f0-9]{64}$"
              },
              "skipped": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "firstAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "lastAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "last": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "projection-value"
                          },
                          "alias": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,62}$"
                          },
                          "storage": {
                            "type": "string",
                            "enum": [
                              "string",
                              "int",
                              "uint",
                              "float",
                              "bool",
                              "datetime",
                              "string[]",
                              "int[]",
                              "uint[]",
                              "float[]",
                              "other"
                            ]
                          },
                          "received": {
                            "type": "string",
                            "enum": [
                              "string",
                              "boolean",
                              "integer",
                              "negative-integer",
                              "unsafe-integer",
                              "fraction",
                              "non-finite",
                              "array",
                              "object",
                              "null"
                            ]
                          },
                          "providerStatus": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind",
                          "alias",
                          "storage",
                          "received"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "projection-expression"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "record-content"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "drained"
                          },
                          "cutoff": {
                            "type": "string",
                            "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                            "description": "An ISO 8601 date time string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "kind",
                          "cutoff"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "count",
                  "firstAt",
                  "lastAt",
                  "last"
                ],
                "additionalProperties": false
              },
              "acceptedHash": {
                "type": "string",
                "pattern": "^fh1:[a-f0-9]{64}$"
              },
              "configSnapshot": {
                "type": "object",
                "properties": {
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "native-object"
                          },
                          "objectType": {
                            "type": "string",
                            "pattern": "^[a-z0-9_-]+"
                          },
                          "query": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "kind",
                          "objectType"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "type": "object"
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "language": {
                        "type": "string",
                        "const": "handlebars"
                      },
                      "header": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "language",
                      "body"
                    ],
                    "additionalProperties": false
                  },
                  "chunking": {
                    "type": "object",
                    "properties": {
                      "splitterId": {
                        "type": "string",
                        "enum": [
                          "plain-text-window"
                        ]
                      },
                      "size": {
                        "default": 1600,
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 128000
                      },
                      "overlap": {
                        "default": 10,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "preserveBoundaries": {
                        "default": true,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "splitterId",
                      "size",
                      "overlap",
                      "preserveBoundaries"
                    ],
                    "additionalProperties": false
                  },
                  "embedding": {
                    "type": "object",
                    "properties": {
                      "model": {
                        "default": "voyage-4",
                        "type": "string",
                        "enum": [
                          "voyage-4-lite",
                          "voyage-4",
                          "voyage-4-large"
                        ]
                      },
                      "dimensions": {
                        "default": 1024,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 512
                          },
                          {
                            "type": "number",
                            "const": 1024
                          },
                          {
                            "type": "number",
                            "const": 2048
                          }
                        ]
                      }
                    },
                    "required": [
                      "model",
                      "dimensions"
                    ],
                    "additionalProperties": false
                  },
                  "projections": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alias": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,62}$"
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "jsonpath",
                            "jsonata"
                          ]
                        },
                        "expression": {
                          "type": "string",
                          "minLength": 1
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "integer",
                            "boolean",
                            "datetime",
                            "string[]",
                            "number[]",
                            "integer[]"
                          ]
                        }
                      },
                      "required": [
                        "alias",
                        "language",
                        "expression",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "source",
                  "template",
                  "chunking",
                  "embedding",
                  "projections"
                ],
                "additionalProperties": false
              },
              "driftedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "hydratedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "generationId",
              "embedderModel",
              "dimensions",
              "functionalHash",
              "acceptedHash"
            ],
            "additionalProperties": false
          },
          "nextGeneration": {
            "type": "object",
            "properties": {
              "generationId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,64}$"
              },
              "embedderModel": {
                "type": "string",
                "enum": [
                  "voyage-4-lite",
                  "voyage-4",
                  "voyage-4-large"
                ]
              },
              "dimensions": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "functionalHash": {
                "type": "string",
                "pattern": "^fh1:[a-f0-9]{64}$"
              },
              "skipped": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "firstAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "lastAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "last": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "projection-value"
                          },
                          "alias": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,62}$"
                          },
                          "storage": {
                            "type": "string",
                            "enum": [
                              "string",
                              "int",
                              "uint",
                              "float",
                              "bool",
                              "datetime",
                              "string[]",
                              "int[]",
                              "uint[]",
                              "float[]",
                              "other"
                            ]
                          },
                          "received": {
                            "type": "string",
                            "enum": [
                              "string",
                              "boolean",
                              "integer",
                              "negative-integer",
                              "unsafe-integer",
                              "fraction",
                              "non-finite",
                              "array",
                              "object",
                              "null"
                            ]
                          },
                          "providerStatus": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind",
                          "alias",
                          "storage",
                          "received"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "projection-expression"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "record-content"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "drained"
                          },
                          "cutoff": {
                            "type": "string",
                            "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                            "description": "An ISO 8601 date time string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "kind",
                          "cutoff"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "count",
                  "firstAt",
                  "lastAt",
                  "last"
                ],
                "additionalProperties": false
              },
              "configSnapshot": {
                "type": "object",
                "properties": {
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "native-object"
                          },
                          "objectType": {
                            "type": "string",
                            "pattern": "^[a-z0-9_-]+"
                          },
                          "query": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "kind",
                          "objectType"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "type": "object"
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "language": {
                        "type": "string",
                        "const": "handlebars"
                      },
                      "header": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "language",
                      "body"
                    ],
                    "additionalProperties": false
                  },
                  "chunking": {
                    "type": "object",
                    "properties": {
                      "splitterId": {
                        "type": "string",
                        "enum": [
                          "plain-text-window"
                        ]
                      },
                      "size": {
                        "default": 1600,
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 128000
                      },
                      "overlap": {
                        "default": 10,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 50
                      },
                      "preserveBoundaries": {
                        "default": true,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "splitterId",
                      "size",
                      "overlap",
                      "preserveBoundaries"
                    ],
                    "additionalProperties": false
                  },
                  "embedding": {
                    "type": "object",
                    "properties": {
                      "model": {
                        "default": "voyage-4",
                        "type": "string",
                        "enum": [
                          "voyage-4-lite",
                          "voyage-4",
                          "voyage-4-large"
                        ]
                      },
                      "dimensions": {
                        "default": 1024,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 512
                          },
                          {
                            "type": "number",
                            "const": 1024
                          },
                          {
                            "type": "number",
                            "const": 2048
                          }
                        ]
                      }
                    },
                    "required": [
                      "model",
                      "dimensions"
                    ],
                    "additionalProperties": false
                  },
                  "projections": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alias": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,62}$"
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "jsonpath",
                            "jsonata"
                          ]
                        },
                        "expression": {
                          "type": "string",
                          "minLength": 1
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "integer",
                            "boolean",
                            "datetime",
                            "string[]",
                            "number[]",
                            "integer[]"
                          ]
                        }
                      },
                      "required": [
                        "alias",
                        "language",
                        "expression",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "source",
                  "template",
                  "chunking",
                  "embedding",
                  "projections"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "generationId",
              "embedderModel",
              "dimensions",
              "functionalHash",
              "configSnapshot"
            ],
            "additionalProperties": false
          },
          "migration": {
            "type": "object",
            "properties": {
              "phase": {
                "type": "string",
                "enum": [
                  "queuing",
                  "hydrating"
                ]
              },
              "totalQueued": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "tallyKey": {
                "type": "string",
                "minLength": 1
              },
              "errorCount": {
                "default": 0,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "queuedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "doneQueuingAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "completionSignalQueuedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "triggeredBy": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "profile-commit",
                      "reindex-directive",
                      "bulk-reindex-api",
                      "initial-hydration"
                    ]
                  },
                  "actor": {
                    "type": "string",
                    "minLength": 1
                  },
                  "profileVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "phase",
              "tallyKey",
              "errorCount",
              "queuedAt",
              "triggeredBy"
            ],
            "additionalProperties": false
          },
          "retired": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "namespace": {
                  "type": "string",
                  "minLength": 1
                },
                "generationId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]{1,64}$"
                },
                "dimensions": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "retiredAt": {
                  "type": "string",
                  "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                  "description": "An ISO 8601 date time string",
                  "format": "date-time"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "cutover",
                    "aborted-migration",
                    "superseded-migration",
                    "profile-deleted"
                  ]
                }
              },
              "required": [
                "namespace",
                "generationId",
                "dimensions",
                "retiredAt",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "pendingEffects": {
            "default": [],
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "retire-namespace"
                    },
                    "effectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                      "description": "An ISO 8601 date time string",
                      "format": "date-time"
                    },
                    "namespace": {
                      "type": "string",
                      "minLength": 1
                    },
                    "generationId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_-]{1,64}$"
                    },
                    "dimensions": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "deleted",
                        "de-matched"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "effectId",
                    "createdAt",
                    "namespace",
                    "generationId",
                    "dimensions",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "publish-generation-change"
                    },
                    "effectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                      "description": "An ISO 8601 date time string",
                      "format": "date-time"
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "maxLength": 63,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "profileId": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "type": {
                          "type": "string",
                          "const": "search-index-generation-changed"
                        },
                        "payload": {
                          "type": "object",
                          "properties": {
                            "change": {
                              "type": "string",
                              "enum": [
                                "queuing",
                                "cutover",
                                "aborted"
                              ]
                            },
                            "currentGenerationId": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "currentFunctionalHash": {
                              "type": "string",
                              "pattern": "^fh1:[a-f0-9]{64}$"
                            },
                            "nextGenerationId": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "nextFunctionalHash": {
                              "type": "string",
                              "pattern": "^fh1:[a-f0-9]{64}$"
                            },
                            "retiredGenerationId": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            }
                          },
                          "required": [
                            "change"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "orgId",
                        "profileId",
                        "type",
                        "payload"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "effectId",
                    "createdAt",
                    "event"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "publish-pipeline-signal"
                    },
                    "effectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                      "description": "An ISO 8601 date time string",
                      "format": "date-time"
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "maxLength": 63,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "profileId": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "type": {
                          "type": "string",
                          "const": "pipeline-signal"
                        },
                        "vectorStoreId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 226,
                          "pattern": "^[A-Za-z0-9._-]+$"
                        },
                        "payload": {
                          "type": "object",
                          "properties": {
                            "generationId": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "functionalHash": {
                              "type": "string",
                              "pattern": "^fh1:[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "generationId",
                            "functionalHash"
                          ],
                          "additionalProperties": false
                        },
                        "action": {
                          "type": "string",
                          "const": "migration-complete"
                        }
                      },
                      "required": [
                        "orgId",
                        "profileId",
                        "type",
                        "vectorStoreId",
                        "payload",
                        "action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "effectId",
                    "createdAt",
                    "event"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "reconcile-profile"
                    },
                    "effectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                      "description": "An ISO 8601 date time string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "kind",
                    "effectId",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              ],
              "type": "object"
            }
          },
          "lastCutoverAt": {
            "type": "string",
            "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
            "description": "An ISO 8601 date time string",
            "format": "date-time"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "hash": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "profileId",
          "retired",
          "pendingEffects",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}
```