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

# Create Certificate

> Create a certificate row referencing an already-uploaded file. The
credential starts out awaiting office review (pending).



## OpenAPI

````yaml /openapi.json post /api/v1/crew/users/{user_id}/certificates
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/crew/users/{user_id}/certificates:
    post:
      tags:
        - crew-certificates
      summary: Create Certificate
      description: |-
        Create a certificate row referencing an already-uploaded file. The
        credential starts out awaiting office review (pending).
      operationId: create_certificate_api_v1_crew_users__user_id__certificates_post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrewCertificateCreateDTO'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewCertificateResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CrewCertificateCreateDTO:
      properties:
        certificateType:
          $ref: '#/components/schemas/CertificateType'
        certificateNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Certificatenumber
        issuingAuthority:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingauthority
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        uploadId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Uploadid
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      required:
        - certificateType
      title: CrewCertificateCreateDTO
      description: Create payload.
    CrewCertificateResponseDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        certificateType:
          type: string
          title: Certificatetype
        certificateNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Certificatenumber
        issuingAuthority:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingauthority
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        uploadId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Uploadid
        uploadedByUserId:
          type: string
          format: uuid
          title: Uploadedbyuserid
        status:
          $ref: '#/components/schemas/DocumentExpiryStatus'
        verification:
          anyOf:
            - $ref: '#/components/schemas/CrewVerificationResponseDTO'
            - type: 'null'
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - certificateType
        - uploadedByUserId
        - status
        - createdAt
        - updatedAt
      title: CrewCertificateResponseDTO
      description: API response shape with computed status.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CertificateType:
      type: string
      enum:
        - stcw_basic_safety
        - deck_certificate
        - gmdss_endorsement
        - oil_tanker_endorsement
        - medical
        - flag_certificate
        - other
      title: CertificateType
      description: Sub-type discriminator within professional certificates.
    DocumentExpiryStatus:
      type: string
      enum:
        - valid
        - expiring_soon
        - expired
      title: DocumentExpiryStatus
      description: |-
        Computed at response time from `expiry_date - today()`.

        No `unknown` value — when there's no expiry_date we use VALID (the
        document doesn't expire; treat as good).
    CrewVerificationResponseDTO:
      properties:
        targetType:
          type: string
          title: Targettype
        targetId:
          type: string
          title: Targetid
        status:
          $ref: '#/components/schemas/VerificationStatus'
        rejectionReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectionreason
        reviewedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reviewedat
      type: object
      required:
        - targetType
        - targetId
        - status
      title: CrewVerificationResponseDTO
      description: |-
        API response shape (camelCase). Used both as the per-item entry in a
        profile summary and embedded as the `verification` field on a credential
        response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VerificationStatus:
      type: string
      enum:
        - not_submitted
        - pending
        - verified
        - rejected
      title: VerificationStatus
      description: Per-item review state.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````