---
updatedAt: 2026-05-12T09:57:24.000Z
---

# Upload API endpoint information

This operation allows you to create or update endpoint information for the specified API asset.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Components": {
        "properties": {
          "callbacks": {
            "type": "object"
          },
          "examples": {
            "type": "object"
          },
          "headers": {
            "type": "object"
          },
          "links": {
            "type": "object"
          },
          "parameters": {
            "type": "object"
          },
          "requestBodies": {
            "type": "object"
          },
          "responses": {
            "type": "object"
          },
          "schemas": {
            "type": "object"
          },
          "securitySchemes": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "Contact": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "format": "uri-reference",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExternalDocumentation": {
        "properties": {
          "description": {
            "type": "string"
          },
          "url": {
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "Info_2": {
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "description": {
            "type": "string"
          },
          "license": {
            "$ref": "#/components/schemas/License"
          },
          "termsOfService": {
            "format": "uri-reference",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "version"
        ],
        "type": "object"
      },
      "License": {
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "Paths": {
        "type": "object"
      },
      "SecurityRequirement": {
        "additionalProperties": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": "object"
      },
      "Server": {
        "properties": {
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ServerVariable"
            },
            "type": "object"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "ServerVariable": {
        "properties": {
          "default": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enum": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "default"
        ],
        "type": "object"
      },
      "Tag": {
        "properties": {
          "description": {
            "type": "string"
          },
          "externalDocs": {
            "$ref": "#/components/schemas/ExternalDocumentation"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "openapi3": {
        "additionalProperties": {
          "type": "object"
        },
        "description": "Validation schema for OpenAPI Specification 3.0.X.",
        "properties": {
          "components": {
            "$ref": "#/components/schemas/Components"
          },
          "externalDocs": {
            "$ref": "#/components/schemas/ExternalDocumentation"
          },
          "info": {
            "$ref": "#/components/schemas/Info_2"
          },
          "openapi": {
            "pattern": "^3\\.0\\.\\d(-.+)?$",
            "type": "string"
          },
          "paths": {
            "$ref": "#/components/schemas/Paths"
          },
          "security": {
            "items": {
              "$ref": "#/components/schemas/SecurityRequirement"
            },
            "type": "array"
          },
          "servers": {
            "items": {
              "$ref": "#/components/schemas/Server"
            },
            "type": "array"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "info",
          "openapi",
          "paths"
        ],
        "type": "object"
      }
    }
  },
  "info": {
    "license": {
      "name": "(c) Copyright 2023 WhiteHat Security"
    },
    "title": "Api Assets API",
    "version": "2.0.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/apiAssets/{siteID}/endpoints": {
      "post": {
        "description": "This operation allows you to create or update endpoint information for the specified API asset.",
        "operationId": "storeOpenAPIDefinitionReq",
        "parameters": [
          {
            "description": "SiteID specifies the API asset where the definition will be stored",
            "in": "path",
            "name": "siteID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "UploadMethod specifies how to handle the currently stored endpoints on upload",
            "in": "query",
            "name": "uploadMethod",
            "schema": {
              "enum": [
                "add",
                "overwrite",
                "merge"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/openapi3"
              }
            }
          },
          "description": "Body of the request holds the definition that is stored for the specified site and from which any endpoints marked with x-wh-scan true at operation level are parsed and enabled for scanning. Accepted definitions types are OpenAPI3 (json/yaml), Swagger2 (json/yaml) and Postman Collections (json)"
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/openapi3"
                }
              }
            },
            "description": "Body provides the stored OpenAPI definition"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            },
            "description": "BadRequestResponse indicates a request with invalid parameters"
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access"
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized"
          },
          "404": {
            "description": "NotFoundResponse indicates a request for a resource that does not exist"
          },
          "500": {
            "description": "GenericError generic error"
          }
        },
        "summary": "Upload API endpoint information",
        "tags": [
          "API Assets API v2.0"
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "API Assets API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```