# Add OpenSearch credentials

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

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

Add credentials to your own OpenSearch cluster.

<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":{"aws_domain_arn":{"description":"The AWS domain ARN of your OpenSearch cluster. Follow [our documentation](https://docs.cloud.deepset.ai/docs/connect-your-own-file-storage) to find your ARN.","title":"AWS Domain ARN","type":"string"},"password":{"description":"The password to your OpenSearch cluster.","title":"Password","type":"string"},"port":{"default":443,"description":"The port of your OpenSearch cluster.","title":"OpenSearch Port","type":"integer"},"username":{"description":"Your OpenSearch cluster username.","title":"Username","type":"string"}},"required":["aws_domain_arn","username","password"],"title":"NewOpenSearchVPCCredentials","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"content":{"application/json":{"schema":{"properties":{"aws_domain_arn":{"description":"The AWS domain ARN of your OpenSearch cluster. Follow [our documentation](https://docs.cloud.deepset.ai/docs/connect-your-own-file-storage) to find your ARN.","title":"AWS Domain ARN","type":"string"},"credentials_id":{"description":"Unique ID of the credentials.","format":"uuid","title":"Credentials ID","type":"string"}},"required":["credentials_id","aws_domain_arn"],"title":"ExternalFacingDocumentStoreCredentials","type":"object"}}},"description":"Credentials to your own OpenSearch cluster added."},"400":{"description":"We couldn't add the credentials to your OpenSearch cluster. See the documentation for [how to obtain the correct credentials](https://docs.cloud.deepset.ai/docs/connect-your-own-file-storage)."},"412":{"description":"We couldn't create the connection to the OpenSearch domain you provided. Follow the instructions in the [documentation](https://docs.cloud.deepset.ai/docs/connect-your-own-file-storage) to allow deepset to connect to your OpenSearch domain."},"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>
