---
title: "Create a new credential"
method: POST
path: "/api/organizations/{organizationId}/credentials"
tags: ["Credentials"]
---

# Create a new credential

`POST /api/organizations/{organizationId}/credentials`

Creates a new credential for the specified organization.

## Path parameters

- `organizationId` string, required

## Request body

- CreateCredentialRequest — Object representing a credential to be created.
  - `name` string, nullable — Name of the credential.
  - `organizationId` string, uuid — Unique identifier for the organization that owns the credential.
  - `category` string, nullable — Category of the credential.
  - `data` string, byte, nullable — Data of the credential in base64 encoded format.
  - `description` string, nullable — Description of the credential.
  - `type` string, nullable — Type of the credential.

## Response `200`

OK

- Credential — Object representing a credential.
  - `id` string, uuid — Unique identifier for the credential.
  - `name` string, nullable — Name of the credential.
  - `description` string, nullable — Description of the credential.
  - `data` string, byte, nullable — Data of the credential in base64 encoded format.
  - `encryptionKeyId` string, uuid, nullable — Optional. Identifier for the encryption key used to encrypt the credential data.
  - `type` string, nullable — Type of the credential.
  - `typeName` string, nullable — Human readable name of the credential type.
  - `organizationId` string, uuid — Unique identifier for the organization that owns the credential.
  - `createdAt` string, date-time — Timestamp of when the credential was created.
  - `createdBy` string, uuid — Unique identifier for the user that created the credential.
  - `updatedAt` string, date-time — Timestamp of when the credential was last updated.
  - `updatedBy` string, uuid — Unique identifier for the user that last updated the credential.
  - `nrOfFlowDefinitions` integer — Number of flow definitions using this credential.
  - `category` string, nullable — Category of the credential.
  - `crn` Crn
    - `reserved1` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `service` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `reserved2` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `organizationId` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `type` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `id` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean
    - `path` ReadOnlySpan1Char
      - `length` integer
      - `isEmpty` boolean

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `503` — Service Unavailable

---

[API](https://skmtc.net/crosser/apis/edge-director-api.md) · [All operations](https://skmtc.net/crosser/apis/edge-director-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crosser/edge-director-api/revisions/746b3f44e69d/schema)
