Create Vault
Updated at:
Creates a Vault for centrally storing and managing Credentials. The request body carries the display name and optional metadata; the response returns the complete Vault object.
Prerequisites
Endpoint and authentication configured. For details, see API overview and authentication.
Endpoint
POST
/vaultsRequest body
display_namestringRequiredHuman-readable name of the Vault, 1-255 characters
metadataobjectOptionalCustom key-value metadata for business use
Request example
curl -X POST "$AGENTSTUDIO_URL/vaults" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Production secrets vault",
"metadata": {
"environment": "production"
}
}'
Response fields
idstringVault ID, format vlt_xxx
typestringAlways vault
display_namestringHuman-readable name of the Vault
metadataobjectCustom key-value pairs
archived_atstring | nullArchive time; null if not archived
created_atstringCreation time, ISO 8601
updated_atstringLast update time, ISO 8601
Response example
{
"id": "vlt_xxx",
"type": "vault",
"display_name": "Production secrets vault",
"metadata": {
"environment": "production"
},
"archived_at": null,
"created_at": "2026-06-20T10:00:00Z",
"updated_at": "2026-06-20T10:00:00Z"
}
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |
Is this page helpful?