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

# Get Document by ID

> The **Get Document by ID** endpoint retrieves the details of a single document using its identifier within a specific envelope.

This endpoint is useful for retrieving specific document information, monitoring document processing status, or displaying document details within your internal system.




## OpenAPI

````yaml https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/documents/{documentID}
openapi: 3.1.0
info:
  title: Nitro Sign Public API
  description: REST API for Nitro Sign
  version: '0.1'
servers:
  - url: https://api.gonitro.dev
security:
  - bearerAuth: []
paths:
  /sign/envelopes/{envelopeID}/documents/{documentID}:
    get:
      tags:
        - Sign
      summary: Get Document by ID
      description: >
        The **Get Document by ID** endpoint retrieves the details of a single
        document using its identifier within a specific envelope.


        This endpoint is useful for retrieving specific document information,
        monitoring document processing status, or displaying document details
        within your internal system.
      operationId: getDocument
      parameters:
        - name: envelopeID
          in: path
          description: >-
            A unique UUIDv4 string that identifies the envelope in the Nitro
            system.
          required: true
          schema:
            type: string
            format: uuid
        - name: documentID
          in: path
          description: A unique string that identifies the document in the Nitro system.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >
            The **GET Document by ID** endpoint returns a JSON object with the
            document's data
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PendingDocumentResponse'
                  - $ref: '#/components/schemas/UploadedDocumentResponse'
                  - $ref: '#/components/schemas/FailedDocumentResponse'
                  - $ref: '#/components/schemas/SignedDocumentResponse'
                  - $ref: '#/components/schemas/SealedDocumentResponse'
        '401':
          description: Unauthorized - Invalid or missing JWT token
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedProblemDetail'
        '404':
          description: Document or envelope not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/NotFoundProblemDetail'
components:
  schemas:
    PendingDocumentResponse:
      type: object
      description: Response for a pending document
      properties:
        name:
          type: string
          description: Name of the file provided by the user.
          minLength: 1
        createdAt:
          type: string
          format: date-time
          description: UTC timestamp indicating when the document was created.
        status:
          type: string
          description: Current status of the document.
          enum:
            - pending
            - uploaded
            - failed
            - signed
            - sealed
        ID:
          type: string
          format: uuid
          description: Unique uuid identifier for the document.
          minLength: 1
      required:
        - ID
        - name
      title: Pending
    UploadedDocumentResponse:
      type: object
      description: Response for an uploaded document
      properties:
        name:
          type: string
          description: Name of the file provided by the user.
          minLength: 1
        createdAt:
          type: string
          format: date-time
          description: UTC timestamp indicating when the document was created.
        status:
          type: string
          description: Current status of the document.
          enum:
            - pending
            - uploaded
            - failed
            - signed
            - sealed
        sizeBytes:
          type: integer
          format: int64
          description: Size in bytes of the document.
        numPages:
          type: integer
          format: int32
          description: Number of pages of the document.
        ID:
          type: string
          format: uuid
          description: Unique uuid identifier for the document.
          minLength: 1
      required:
        - ID
        - name
      title: Uploaded
    FailedDocumentResponse:
      type: object
      description: Response for a failed document
      properties:
        name:
          type: string
          description: Name of the file provided by the user.
          minLength: 1
        createdAt:
          type: string
          format: date-time
          description: UTC timestamp indicating when the document was created.
        status:
          type: string
          description: Current status of the document.
          enum:
            - pending
            - uploaded
            - failed
            - signed
            - sealed
        sizeBytes:
          type: integer
          format: int64
          description: Size in bytes of the document.
        numPages:
          type: integer
          format: int32
          description: Number of pages of the document.
        failureReason:
          type: string
          description: The failure reason of the document.
        ID:
          type: string
          format: uuid
          description: Unique uuid identifier for the document.
          minLength: 1
      required:
        - ID
        - name
      title: Failed
    SignedDocumentResponse:
      type: object
      description: Response for a signed document
      properties:
        name:
          type: string
          description: Name of the file provided by the user.
          minLength: 1
        createdAt:
          type: string
          format: date-time
          description: UTC timestamp indicating when the document was created.
        status:
          type: string
          description: Current status of the document.
          enum:
            - pending
            - uploaded
            - failed
            - signed
            - sealed
        sizeBytes:
          type: integer
          format: int64
          description: Size in bytes of the document.
        numPages:
          type: integer
          format: int32
          description: Number of pages of the document.
        ID:
          type: string
          format: uuid
          description: Unique uuid identifier for the document.
          minLength: 1
      required:
        - ID
        - name
      title: Signed
    SealedDocumentResponse:
      type: object
      description: Response for a sealed document
      properties:
        name:
          type: string
          description: Name of the file provided by the user.
          minLength: 1
        createdAt:
          type: string
          format: date-time
          description: UTC timestamp indicating when the document was created.
        status:
          type: string
          description: Current status of the document.
          enum:
            - pending
            - uploaded
            - failed
            - signed
            - sealed
        sizeBytes:
          type: integer
          format: int64
          description: Size in bytes of the document.
        numPages:
          type: integer
          format: int32
          description: Number of pages of the document.
        ID:
          type: string
          format: uuid
          description: Unique uuid identifier for the document.
          minLength: 1
      required:
        - ID
        - name
      title: Sealed
    UnauthorizedProblemDetail:
      type: object
      description: Unauthorized error details
      example:
        type: >-
          https://developers.gonitro.com/docs/build-nitro/errors#401-unauthorized
        title: Unauthorized
        status: 401
        detail: Missing or invalid Authorization header
        instance: /sign/envelopes
      properties:
        type:
          type: string
          description: A URI reference that identifies the problem type
        title:
          type: string
          description: A short, human-readable summary of the problem type
        status:
          type: integer
          format: int32
          description: The HTTP status code
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence
        extensions:
          type: object
          additionalProperties: {}
          description: Additional problem-specific properties
    NotFoundProblemDetail:
      type: object
      description: Not Found error details
      example:
        type: https://developers.gonitro.com/docs/build-nitro/errors#404-not-found
        title: Not Found
        status: 404
        detail: Envelope with ID 'envelop-123' not found
        instance: /sign/envelopes/envelop-123
      properties:
        type:
          type: string
          description: A URI reference that identifies the problem type
        title:
          type: string
          description: A short, human-readable summary of the problem type
        status:
          type: integer
          format: int32
          description: The HTTP status code
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence
        extensions:
          type: object
          additionalProperties: {}
          description: Additional problem-specific properties
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````