---
title: "POST /v1/projects/{projectId}/credentials"
method: POST
path: "/v1/projects/{projectId}/credentials"
tags: ["Credentials"]
---

# POST /v1/projects/{projectId}/credentials

`POST /v1/projects/{projectId}/credentials`

## Path parameters

- `projectId` string, required

## Request body

- GoliothCredentialsCreateBody
  - `deviceId` string
  - `identity` string
  - `preSharedKey` string
  - `type` 'PRE_SHARED_KEY' | 'ASYMMETRIC_KEY_PAIR'

## Response `200`

A successful response.

- GoliothCreateCredentialResponse
  - `data` GoliothCredential
    - `createdAt` string, date-time
    - `id` string
    - `identity` string
    - `preSharedKey` string
    - `type` 'PRE_SHARED_KEY' | 'ASYMMETRIC_KEY_PAIR'

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/golioth/apis/golioth-api.md) · [All operations](https://skmtc.dev/golioth/apis/golioth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/golioth/golioth-api/revisions/47c98ae69a55/schema)
