---
updatedAt: 2026-09-28T14:14:20.000Z
agentTools:
  projectIndex: https://developer.searchblox.com/llms.txt
---

# Add Collection - /rest/v2/api/coladd

JSON  Payload

[block:parameters]
{
  "data": {
    "h-0": "XML Tag",
    "h-1": "Attribute",
    "h-2": "Value",
    "0-0": "searchblox",
    "0-1": "apikey",
    "0-2": "API key from https://localhost:8443/searchblox/admin/main.jsp?menu1=adm",
    "3-0": "document",
    "3-1": "colname",
    "3-2": "Name of the custom collection",
    "1-0": "searchblox",
    "1-1": "public",
    "2-0": "searchblox",
    "2-1": "encrypt",
    "1-2": "Collection access type either true or false.\nIf \"true\", then access type is \"public\".\nIf \"false\", then access type is \"private\"",
    "2-2": "Collection encryption either true or false."
  },
  "cols": 3,
  "rows": 4
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "12.2"
  },
  "servers": [
    {
      "url": "https://127.0.0.1:8443/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/rest/v2/api/coladd": {
      "post": {
        "summary": "Add Collection - /rest/v2/api/coladd",
        "description": "JSON  Payload",
        "operationId": "restv1apicoladd",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SB-PKEY",
            "in": "header",
            "description": "Security Key by SBAdmin or Admin",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "status code : 900"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {},
              "examples": {
                "Request Example": {
                  "value": {
                    "apikey": "DAB42B6BDDFDD1F079C12B2FFEDCB92E5",
                    "public": true,
                    "encrypt": false,
                    "document": {
                      "colname": "custom",
                      "coltype": "custom",
                      "language": "en"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```