# Create Workspace

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

<MethodEndpoint
  method={"post"}
  path={"/api/v1/workspaces"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Creates a workspace within an organization.

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

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

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"properties":{"document_store_credentials":{"anyOf":[{"properties":{"pipeline_document_store_credentials_id":{"description":"The ID of the credentials for the OpenSearch cluster you want to use to serve your deployed pipelines. Use the endpoint 'list_available_opensearch_credentials' to list all credentials available in your organization.","format":"uuid","title":"Pipeline cluster credentials ID","type":"string"},"workspace_document_store_credentials_id":{"description":"The ID of the credentials for the OpenSearch cluster you want to use for managing the files in this workspace.Use the endpoint 'list_available_opensearch_credentials' to list all credentials available in your organization.","format":"uuid","title":"Workspace document store credentials ID","type":"string"}},"required":["workspace_document_store_credentials_id","pipeline_document_store_credentials_id"],"title":"WorkspaceDocumentStoreCredentials","type":"object"},{"type":"null"}]},"file_store_credentials":{"anyOf":[{"properties":{"file_store_credentials_id":{"description":"The ID of the credentials for the S3 bucket you want to use to serve your deployed pipelines. Use the endpoint 'list_available_s3_credentials' to list all credentials available in your organization.","format":"uuid","title":"File Store Credentials ID","type":"string"}},"required":["file_store_credentials_id"],"title":"WorkspaceFileStoreCredentials","type":"object"},{"type":"null"}]},"name":{"description":"The name of the workspace. It must be longer than 3 characters.","title":"Workspace name","type":"string"}},"required":["name"],"title":"NewWorkspace","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"description":"The name of the workspace '{workspace_name}' must contain more than 3 characters. Give your workspace a longer name."},"402":{"description":"Creating workspaces is not supported with your current plan. Please contact deepset support."},"404":{"description":"We couldn't find the specified credentials. Use the endpoint 'list_available_opensearch_credentials' for listing document store credentials in your organization and 'list_available_s3_credentials' for listing S3 credentials in your organization."},"406":{"description":"You reached the workspace limit. Delete an existing workspace to create a new one."},"409":{"description":"This workspace {workspace_name} already exists. Try giving your new workspace a different name."},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
