Skip to content

Doc list command fails with date_created field type mismatch #2

@alextnetto

Description

@alextnetto

Bug Description

The clickup doc list command fails with a JSON unmarshaling error when trying to parse the ClickUp API response.

Command Used

./clickup doc list --workspace 90132341641

Error Message

{
  "error": "failed to parse response: json: cannot unmarshal number into Go struct field Doc.docs.date_created of type string",
  "code": "UNMARSHAL_ERROR"
}

Expected Behavior

Should list all documents in the workspace in JSON format.

Analysis

The ClickUp API appears to return date_created as a number (Unix timestamp), but the Go struct Doc.docs.date_created field is expecting a string type.

Environment

  • CLI Version: v1.0.0
  • OS: Ubuntu Linux
  • API: ClickUp v3 (docs endpoint)

Suggested Fix

Change Doc.date_created field type from string to int64 or json.Number to properly handle Unix timestamps from the API.

Impact

This prevents accessing ClickUp documentation through the CLI, which limits the ability to manage comprehensive documentation for projects and workflows.

Context

This was discovered while setting up AI-powered CRO operations that require document management capabilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions