# Record one completed embedding branch of a reconciliation run

`POST /reconciliations/complete`



[AI Search API guide](https://docs.contextual.io/legacy/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": {
    "/reconciliations/complete": {
      "post": {
        "tags": [
          "Internal"
        ],
        "summary": "Record one completed embedding branch of a reconciliation run",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "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]+)*$"
                  },
                  "reconciliationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "recordUri": {
                    "type": "string",
                    "minLength": 1
                  },
                  "dispatchId": {
                    "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)$"
                  },
                  "namespaces": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 226,
                      "pattern": "^[A-Za-z0-9._-]+$"
                    }
                  },
                  "completedNamespace": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 226,
                    "pattern": "^[A-Za-z0-9._-]+$"
                  }
                },
                "required": [
                  "orgId",
                  "profileId",
                  "reconciliationId",
                  "recordUri",
                  "dispatchId",
                  "namespaces"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reconciliation branch completion recorded",
            "content": {}
          },
          "400": {
            "description": "Invalid reconciliation completion",
            "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}
```