# Create a credential, or link an identical existing one to the topologies

Canonical: https://docs.shumoku.dev/en/server/next/api/postCredentials
Language: en
Server documentation version: next
Product version: 0.3.0-beta.2
Channel: development

This documentation describes the Server currently in development.

Shumoku Server API · 0.3.0-beta.2 · Credentials

# Create a credential, or link an identical existing one to the topologies

[OpenAPI source](https://github.com/konoe-akitoshi/shumoku/blob/20492b00ee57d7db79ee0ac7f795122308a7c80e/apps/server/api/openapi.json)

```
POST /api/credentials
```

## Authentication

sessionCookie / bearerAuth

## Request body

`CreateCredential` · application/json · required

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `200` | An identical credential existed; the topologies were linked to it | `CreateCredentialResult` |
| `201` | Credential created | `CreateCredentialResult` |
| `400` | The request did not match the API contract | `Error` |
| `404` | Credential or topology not found | `Error` |
| `409` | Conflict, e.g. a credential with this name already exists | `Error` |
| `500` | Credential operation failed | `Error` |

[`apps/server/api/openapi.json`](https://github.com/konoe-akitoshi/shumoku/blob/20492b00ee57d7db79ee0ac7f795122308a7c80e/apps/server/api/openapi.json)
