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

# Create an SSH key credential



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/credentials/digitalocean/ssh-key
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/credentials/digitalocean/ssh-key:
    post:
      tags:
        - DigitalOcean Credentials API
      summary: Create an SSH key credential
      operationId: >-
        create_ssh_key_credential_endpoint_api_v1_credentials_digitalocean_ssh_key_post
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSSHKeyCredentialRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSSHKeyCredentialResponse'
          description: SSH key credential created successfully
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CreateSSHKeyCredentialRequest:
      properties:
        generate:
          default: false
          title: Generate
          type: boolean
        name:
          title: Name
          type: string
        ssh_public_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssh Public Key
      required:
        - name
      title: CreateSSHKeyCredentialRequest
      type: object
    CreateSSHKeyCredentialResponse:
      properties:
        errors:
          default: []
          items:
            $ref: '#/components/schemas/ResourceError'
          title: Errors
          type: array
        id:
          anyOf:
            - format: uuid4
              type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        private_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Private Key
        success:
          default: true
          title: Success
          type: boolean
      title: CreateSSHKeyCredentialResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ResourceError:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorItem'
          title: Errors
          type: array
        kind:
          title: Kind
          type: string
        name:
          title: Name
          type: string
      required:
        - name
        - kind
      title: ResourceError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ErrorItem:
      properties:
        key:
          title: Key
          type: string
        message:
          title: Message
          type: string
      required:
        - key
        - message
      title: ErrorItem
      type: object

````