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

# Create Credential

`POST /credentials/`

Call auditlog tasks if applicable to query.

## Request body

- Secret
  - `id` string, required — A unique Base58 value identifying this object.
  - `uri` string, required
  - `name` string, required
  - `team` string, nullable — A unique Base58 value identifying this object.
  - `description` string
  - `is_sensitive` boolean
  - `value` unknown, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `creator` SimpleUser, required
    - `id` string, required — A unique Base58 value identifying this object.
    - `email` string, email — Email of the user.
    - `name` string, required — Name of the user.
  - `usage_count` integer, required
  - `references` SecretReference[], required
    - `root_object_id` string, required — ID of the object where the Credential is used.
    - `root_object_type` string, required — Type of the object where the Credential is used (e.g. Target, Domain).
    - `root_object_display_name` string, required — Display name of the object where the Credential is used.
    - `ui_reference_key` string, required — The key to identify the field where the Credential is used.

## Response `201`

- Secret
  - `id` string, required — A unique Base58 value identifying this object.
  - `uri` string, required
  - `name` string, required
  - `team` string, nullable — A unique Base58 value identifying this object.
  - `description` string
  - `is_sensitive` boolean
  - `value` unknown, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `creator` SimpleUser, required
    - `id` string, required — A unique Base58 value identifying this object.
    - `email` string, email — Email of the user.
    - `name` string, required — Name of the user.
  - `usage_count` integer, required
  - `references` SecretReference[], required
    - `root_object_id` string, required — ID of the object where the Credential is used.
    - `root_object_type` string, required — Type of the object where the Credential is used (e.g. Target, Domain).
    - `root_object_display_name` string, required — Display name of the object where the Credential is used.
    - `ui_reference_key` string, required — The key to identify the field where the Credential is used.

## Other responses

- `400`
- `401`
- `404`
- `500`

---

[API](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation.md) · [All operations](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/probely/snyk-api-web-s-api-reference-documentation/revisions/e29879bff01b/schema)
