> ## Documentation Index
> Fetch the complete documentation index at: https://support.fortanix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new integration credential

> Create a new integration credential

## OpenAPI

````json POST /sys/v1/credentials
{
  "openapi": "3.0.0",
  "info": {
    "title": "Fortanix DSM REST API",
    "description": "This is a set of REST APIs for accessing the Fortanix Data Security Manager. This includes APIs for managing accounts, and for performing cryptographic and key management operations. \n\n **Note:** \n- All binary input should be base64-encoded. These fields are marked with `format: byte`. \n- For forward compatibility, any API client is expected to ignore any fields in the response not explicitly mentioned in the documentation. We reserve the right to add new fields at any time to provide new functionality without affecting existing API clients.",
    "termsOfService": "https://www.fortanix.com/legal/terms/",
    "contact": {
      "name": "Fortanix Support",
      "url": "https://support.fortanix.com/",
      "email": "support@fortanix.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "0.1.0-20260526"
  },
  "servers": [
    {
      "url": "https://amer.smartkey.io"
    }
  ],
  "paths": {
    "/sys/v1/credentials": {
      "post": {
        "operationId": "CreateCredential",
        "tags": [
          "Credentials"
        ],
        "security": [
          {
            "bearerToken": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "summary": "Create a new integration credential",
        "description": "Create a new integration credential",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationCredentialCreateRequest"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationCredential"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "IntegrationCredentialCreateRequest": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "credential_details": {
                "$ref": "#/components/schemas/CredentialDetails"
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "group_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the group that this credential is associated with"
              },
              "name": {
                "type": "string",
                "maxLength": 4096,
                "pattern": "^[^\\n]*[^\\s\\n][^\\n]*$",
                "description": "The human readable name of the credential"
              }
            },
            "required": [
              "credential_details",
              "group_id",
              "name"
            ]
          }
        ]
      },
      "IntegrationCredential": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "pattern": "^\\d{4}\\d{2}\\d{2}T\\d{2}\\d{2}\\d{2}Z$",
                "example": "20170509T070912Z",
                "description": "The time the credential was created"
              },
              "creator": {
                "$ref": "#/components/schemas/Principal"
              },
              "credential_details": {
                "$ref": "#/components/schemas/CredentialDetails"
              },
              "credential_id": {
                "type": "string",
                "format": "uuid"
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "group_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the group that this credential is associated with"
              },
              "name": {
                "type": "string",
                "maxLength": 4096,
                "pattern": "^[^\\n]*[^\\s\\n][^\\n]*$",
                "description": "The human readable name of the credential"
              }
            },
            "required": [
              "created_at",
              "creator",
              "credential_details",
              "credential_id",
              "group_id",
              "name"
            ]
          }
        ]
      },
      "CredentialDetails": {
        "description": "Describes the authentication type for a given integration.\n\nThis type is the \"backbone\" to the credential objects in DSM as it's what\ncontains the relevant information and references to the sobject(s) needed to authenticate\nto external systems/services.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CredentialDetailsVariantOci"
          }
        ],
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "Oci": "CredentialDetailsVariantOci"
          }
        }
      },
      "Principal": {
        "description": "A security principal.",
        "oneOf": [
          {
            "title": "PrincipalVariantApp",
            "type": "object",
            "properties": {
              "app": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "app"
            ]
          },
          {
            "title": "PrincipalVariantUser",
            "type": "object",
            "properties": {
              "user": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "user"
            ]
          },
          {
            "title": "PrincipalVariantPlugin",
            "type": "object",
            "properties": {
              "plugin": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "plugin"
            ]
          },
          {
            "title": "PrincipalVariantUserViaApp",
            "type": "object",
            "properties": {
              "userviaapp": {
                "$ref": "#/components/schemas/PrincipalUserViaApp"
              }
            },
            "required": [
              "userviaapp"
            ]
          },
          {
            "title": "PrincipalVariantSystem",
            "type": "string",
            "enum": [
              "system"
            ]
          },
          {
            "title": "PrincipalVariantUnregisteredUser",
            "type": "string",
            "enum": [
              "unregistereduser"
            ]
          }
        ]
      },
      "CredentialDetailsVariantOci": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "$type": {
                "type": "string",
                "enum": [
                  "Oci"
                ]
              },
              "body": {
                "$ref": "#/components/schemas/OciCredentialAuth"
              }
            },
            "required": [
              "$type",
              "body"
            ]
          }
        ]
      },
      "PrincipalUserViaApp": {
        "allOf": [
          {
            "type": "object",
            "description": "UserViaApp signifies a user authorizing some app to act on its behalf through OAuth.",
            "properties": {
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "scopes": {
                "type": "array",
                "uniqueItems": true,
                "items": {
                  "$ref": "#/components/schemas/OauthScope"
                }
              }
            },
            "required": [
              "user_id",
              "scopes"
            ]
          }
        ]
      },
      "OciCredentialAuth": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OciCredentialAuthVariantApiKey"
          }
        ],
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "ApiKey": "OciCredentialAuthVariantApiKey"
          }
        }
      },
      "OauthScope": {
        "description": "OAuth scope.",
        "type": "string",
        "enum": [
          "app",
          "openid",
          "email",
          "profile"
        ]
      },
      "OciCredentialAuthVariantApiKey": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "$type": {
                "type": "string",
                "enum": [
                  "ApiKey"
                ]
              }
            },
            "required": [
              "$type"
            ]
          },
          {
            "$ref": "#/components/schemas/OciCredentialAuthApiKey"
          }
        ]
      },
      "OciCredentialAuthApiKey": {
        "allOf": [
          {
            "type": "object",
            "description": "**NOTE**: This is not to be confused with a static long-lived token.",
            "properties": {
              "user_ocid": {
                "type": "string",
                "description": "The user's OCID from Oracle who will have the public key\nconfigured as an \"API Key\" on Oracle servers. That public\nkey is part of the key-pair represented by `signing_key`."
              },
              "tenant_ocid": {
                "type": "string",
                "description": "The tenant OCID from Oracle"
              },
              "signing_key": {
                "$ref": "#/components/schemas/SobjectId"
              }
            },
            "required": [
              "user_ocid",
              "tenant_ocid",
              "signing_key"
            ]
          }
        ]
      },
      "SobjectId": {
        "description": "A wrapper type to provide better clarity of the id referenced\nis in fact to security object.",
        "allOf": [
          {
            "type": "string",
            "format": "uuid"
          }
        ]
      }
    }
  }
}
````

