---
title: "Create a WarehouseCredential"
method: POST
path: "/api/v3/warehouse-credential:create-warehouse-credential"
tags: ["Warehouse Credential"]
---

# Create a WarehouseCredential

`POST /api/v3/warehouse-credential:create-warehouse-credential`

## Request

- Base URL: `https://{tenant_name}.benchling.com`
- URL: `https://{tenant_name}.benchling.com/api/v3/warehouse-credential:create-warehouse-credential`
- Auth: HTTP bearer

Create a new WarehouseCredential. Generates a username and password, provisions the credential in the warehouse, and returns the one-time password.

## Request body

- CreateWarehouseCredentialCustomMethodInput
  - `expiresAt` string, date-time, required: The time after which new connections using the username/password will not be permitted. Upon expiration, currently open connections are not terminated. Must be no more than the tenant's configured maximum (24 hours by default) in the future.
  - `label` string, nullable: An optional label defined by the user who created the WarehouseCredential.

## Response `200`

OK

- CreateWarehouseCredentialOutput: Output of the create warehouse credential custom method. Contains the created credential and the one-time password that must be saved by the caller.
  - `password` string: The generated password for the warehouse credential. This value is only returned once at creation time and cannot be retrieved again.
  - `warehouseCredential` WarehouseCredentialRef
    - `__typename` string
    - `id` string, api_id

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/benchling/apis/benchling-api.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api/revisions/3873a10bf7b8?raw)
