# Add S3 Credentials

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Add S3 Credentials"}
>
</Heading>

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

Add credentials to your own S3 bucket.

<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":{"assume_role":{"properties":{"role_arn":{"description":"The role which Haystack Enterprise Platform should assume to access your bucket.","title":"Role ARN","type":"string"},"role_session_name":{"description":"The identifier for the assumed role session which Haystack Enterprise Platform uses to access your bucket.","title":"Role Session Name","type":"string"}},"required":["role_arn","role_session_name"],"title":"AWSAssumeRoleCredentials","type":"object"},"aws_endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The AWS endpoint URL of your S3 bucket.","title":"AWS Endpoint URL"},"bucket_name":{"description":"The name of your S3 bucket.","title":"S3 Bucket Name","type":"string"}},"required":["bucket_name","assume_role"],"title":"NewS3Credentials","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"content":{"application/json":{"schema":{"properties":{"aws_endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The AWS endpoint URL of your S3 bucket.","title":"AWS Endpoint URL"},"bucket_name":{"description":"The name of your S3 bucket.","title":"S3 Bucket Name","type":"string"},"credentials_id":{"description":"Unique ID of the credentials.","format":"uuid","title":"Credentials ID","type":"string"}},"required":["credentials_id","bucket_name"],"title":"ExternalS3Credentials","type":"object"}}},"description":"Credentials to your own S3 bucket added"},"412":{"description":"We couldn't create the connection to the S3 bucket you provided. Possible reasons are a wrong bucket name or missing bucket permissions. Check the response body for more details. See the documentation for [how to correctly configure the bucket permissions](https://docs.cloud.deepset.ai/)."},"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>
