# Delete OpenSearch credentials

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Delete OpenSearch credentials"}
>
</Heading>

<MethodEndpoint
  method={"delete"}
  path={"/api/v1/infrastructure/document_stores/{credentials_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Delete credentials to your own OpenSearch cluster.

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

<ParamsDetails
  parameters={[{"description":"A unique identifier of the credentials you want to delete. Use the [List Available OpenSearch Credentials](https://docs.cloud.deepset.ai/reference/list_available_opensearch_credentials_api_v1_infrastructure_document_stores_get) endpoint to check the ID.","in":"path","name":"credentials_id","required":true,"schema":{"description":"A unique identifier of the credentials you want to delete. Use the [List Available OpenSearch Credentials](https://docs.cloud.deepset.ai/reference/list_available_opensearch_credentials_api_v1_infrastructure_document_stores_get) endpoint to check the ID.","format":"uuid","title":"Credentials ID","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"204":{"description":"Credentials to your own OpenSearch cluster deleted"},"400":{"description":"We couldn't delete the specified document store credentials because they are currently in use. Delete all workspaces which use these credentials and try again."},"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."},"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>
