> ## 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 Identity Document

> Create an identity document row. The file is expected to have
already been uploaded via the shared upload subsystem; the client
passes the resulting ``upload_id`` here. The document starts out awaiting
office review (pending).



## OpenAPI

````yaml /openapi.json post /api/v1/crew/users/{user_id}/identity-documents
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/crew/users/{user_id}/identity-documents:
    post:
      tags:
        - crew-identity-documents
      summary: Create Identity Document
      description: >-
        Create an identity document row. The file is expected to have

        already been uploaded via the shared upload subsystem; the client

        passes the resulting ``upload_id`` here. The document starts out
        awaiting

        office review (pending).
      operationId: >-
        create_identity_document_api_v1_crew_users__user_id__identity_documents_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/CrewIdentityDocumentCreateDTO'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewIdentityDocumentResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CrewIdentityDocumentCreateDTO:
      properties:
        documentType:
          $ref: '#/components/schemas/IdentityDocumentType'
        documentNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentnumber
        issuingCountry:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingcountry
        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:
        - documentType
      title: CrewIdentityDocumentCreateDTO
      description: |-
        Create payload — after a file is uploaded via the upload service,
        the client posts metadata referencing the resulting upload_id.
    CrewIdentityDocumentResponseDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        documentType:
          type: string
          title: Documenttype
        documentNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentnumber
        issuingCountry:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingcountry
        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
        - documentType
        - uploadedByUserId
        - status
        - createdAt
        - updatedAt
      title: CrewIdentityDocumentResponseDTO
      description: API response shape with computed status.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IdentityDocumentType:
      type: string
      enum:
        - passport
        - us_visa
        - seaman_book
        - national_id
      title: IdentityDocumentType
      description: Sub-type discriminator within identity documents.
    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

````