---
title: "Create Credential"
method: POST
path: "/api/vault/credentials"
tags: ["vault"]
---

# Create Credential

`POST /api/vault/credentials`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/vault/credentials`
- Auth: HTTP bearer

## Request body

- CredentialCreateRequest
  - `name` string, required
  - `credential_type` string, required
  - `description` string, nullable
  - `fields` object, required
  - `metadata` object, nullable
  - `agent_ids` string[], nullable

## Response `201`

Successful Response

- CredentialResponse
  - `id` string, uuid, required
  - `name` string, required
  - `slug` string, nullable
  - `credential_type` string, required
  - `description` string, nullable
  - `metadata` object, nullable
  - `field_keys` string[]
  - `created_by_name` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `grants` SrcSchemasVaultGrantResponse[]
    - `id` string, uuid, required
    - `credential_id` string, uuid, required
    - `agent_id` string, uuid, required
    - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
