---
title: "Create Cloud Credential"
method: POST
path: "/api/v1/cloud-credentials"
tags: ["cloud-credentials"]
---

# Create Cloud Credential

`POST /api/v1/cloud-credentials`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/cloud-credentials`
- Auth: none declared

Create a new cloud credential.

Credentials are stored securely in OpenBao, not in our database.
After creation, credentials should be validated using the validate endpoint.

## Request body

- CloudCredentialCreate: Create a new cloud credential.
  - `name` string, required: User-friendly name
  - `provider` string, required: Cloud provider: aws, gcp, azure, hetzner, scaleway, thalassa, digitalocean
  - `credentials` object, required: Provider-specific credentials
  - `organization_id` string, uuid, nullable: Active org; defaults to the user's personal org

## Response `201`

Successful Response

- CloudCredentialResponse: Response schema for a cloud credential (excludes sensitive data).
  - `id` string, uuid, required
  - `name` string, required
  - `organization_id` string, uuid, nullable
  - `provider` string, required
  - `status` string, required
  - `is_valid` boolean, required
  - `validation_error` string, nullable
  - `last_validated_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
