---
id: namespace-create
title: "Create a namespace"
description: "Create a new namespace in an existing account."
sidebar_label: "Create a namespace"
hide_title: true
hide_table_of_contents: true
api: eJzdWG1v2zYQ/ivEfdoAxXHe9kHf3KzD0m1t0LhYgdQIzuJZZiORKknFcQ399+EoyZJst8mAbAOWD4pMH+/lueeOPG9AkkusKrwyGmK4tISeBApNK6ExJ1dgQkJpgVrQo3Je6VRgkphS+xFEYAqyyJuvJMSw3REnQRFE4DF1EN/C2/YrmEVg6UtJzr8ycg3xBhKjPWnPr1gUmUqCxuPPjn3agEuWlCO/+XVBEIOZf6bEQ61HWZJsgG1DBI1vd0qyocKyg16R4+1BJN4APWJeZBTiXRfeiN+MTsUrlWVKp+xzbcZ5W3/O8fF30qlfQvzTONqBbLqkgJQwC+Gb9xDoSLynwpIj7Z1AIalA63PSPhKeMI+EsSIzqUowE6VWXqyUXyot1qa0wtgUtfoagBhBNYirH8HJ6dn51mGlPaVk4ZCLVz+3DjaahF+iF2alnfBL5Xp+Q1VF4JUPCG2Xa2pAVfG3jpLSKr+G+HYDc0JLdlIyPrezKuTXFUa7GvXT8Zj/7bu05Y5YoROuTBJyblFmzKsXoYSSELW8cFnJqezjehe+t1QYp7yx67vCmgclA4CDVVqoR1bh0ZfuCY7V+XkiIRPh1s5TfrRSkjj5X8qQoYWxOxyCqMv16dl5FW1J/EIk7Rs4WA7VNvADRvet1LKH7egy57Rg4tUD50Tp5nXWd6JZq5qcxZvd0L7vxES3DB+gy7qewBeSEP7RvdHp0bwLf1h6L1xr0aCWqwhy8ijRHyT3vqlWWmQGJUnxoLBbS9BjZlIxub4aGNrAPa0hhgfMygD0kMLhy+fk+p7WbaCtzdCrar3PUhFEDypBKRULYnY3dO/7oEy220S3bd/Absx1Q+nrR2txfZjiteyu0oiPyTc3794yzXL0IYr6+NtTqjzlB4N5Ria+DXBV/3XN+4/GtUuTF0ZzPz3Y2pumfv7x436jvswUaS/IWmPFtq8LWZLwRij9gJmSQumi9Hyg5co5viIUaDEnT9a9WDevO8ulkdw6gj/c9cg5TGm/D/ekny7aX6fT67ZzJUaSsO3JzbFwkl1BiVqoRCR9PH6gUTqKxPl4zI8Tfpzx4/zHQb2dj8cVgyCfURQTkWOyVJqOLKHEeUaNreBX6CMJekqNVV/J1b6RfSArFqiy0u60tDnKu+a2xcSpYXuGE3OraBGJZZmj7jzpSbXsr51jdS0an+AVSvG+NvoJeOGDxtIvg8vyEwzB6UtD1WX0aSe7SpfkUWVO4NyUvnNraIdLt4EiXDhyzLhQSYqArvaoNMktpfsMbuvq4lCF3NTw71aI0jLwnO/LWijnuM/p4Nzk+ko4Jel/VhquD0RDhgsujYvxKT/Ohom/+O+qgoO1fLLUQnc1ZP9afVw15kVDndcsU1cKr6iExAeND6gy1rpXMAe3/6OlM9Gi1PRYUOJJNiGZJCmtJTkS1xmhI+HtWmCKSosMPdlRdxzl5JeG58PCuHDIIV/l4Lg7gHii4FhcGChKm0EMS+8LFx8fY6FGusyyIkPPBTtKTA48ZbRDyA3XSE3t/iiyBYEVsYUgxj0xCEHUvPwSTmuI4c2f03A+cu297ybU1921qb57f2Nq7F8TT+q7utILw/s4shr5k9F4NIbuDO7GYr6GGedz1ANL7Tzeg2qQy970/Pen9wYgT4/+uMhQafYioL9pknTbuyXMIlhyAuNb2Gzm6OiDzaqKl7+UZHkWnPHVxCpmbRgFI1gS8kDFWa3vnJe1t0dTNr29yez3vipqd0yShAr/XdlZj2PX726mnNvmt4U89BewuOKeiSuIIfxswbsDZcLaBjLUaRmKB2qdzAQcEmmHOCGq9mKn1z0PN5taYmruSVcVRE0onj9DNauq6i+cMA11
sidebar_class_name: "post api-method"
info_path: docs/api/namespace
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create a namespace"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/namespace"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Create a new namespace in an existing account.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","required":["name","account_id"],"properties":{"name":{"example":"Crypto Kong Billing","type":"string","maxLength":60,"description":"The name of the namespace. Represents a department, team, or logical unit within your organization."},"account_id":{"example":1234,"type":"integer","description":"The ID of the account that owns this namespace."}},"title":"namespaceCreate"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"object","required":["id","name","slug","organization_id","repository_provider","repository_prefix","status","account_id"],"properties":{"id":{"type":"integer","description":"A system-wide unique ID for the namespace.","example":234},"name":{"type":"string","maxLength":60,"description":"The name of the namespace.","example":"Crypto Kong Billing"},"status":{"type":"string","description":"The status of the namespace.","enum":["active","inactive"],"example":"active"},"slug":{"maxLength":60,"type":"string","description":"An account-wide unique slug for the namespace.","example":"crypto-kong-billing"},"account_id":{"type":"integer","description":"The ID of the account that owns this namespace.","example":123},"metadata":{"type":"object","description":"The metadata loaded via metadata catalog API.","example":{"key":"value"},"properties":{"key":{"type":"string","description":"The key of the metadata."},"value":{"type":"string","description":"The value of the metadata."},"additional_properties":{"type":"object","description":"Additional properties of the metadata.","properties":{"schemas":{"type":"array","description":"The schemas of the metadata, in JSON format."},"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}}}}},"title":"MetadataComponent"}},"title":"namespace"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      