# List issue timeline (https://docs.capy.ai/api-reference/issues/list-issue-timeline)

`GET https://api.capy.ai/api/v1/issues/{code}/timeline`

## Authorization

Send an API key as a bearer token: `Authorization: Bearer $CAPY_API_KEY`. See https://docs.capy.ai/api-reference/authentication.md.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `code` | path | string | yes |  |

## Responses

- `200` IssueTimeline: `IssueTimelineEncoded`
- `400` capy/InvalidRequest: `capy_InvalidRequestEncoded`
- `401` capy/Unauthorized: `capy_UnauthorizedEncoded`
- `403` capy/Forbidden: `capy_ForbiddenEncoded \| capy_ForbiddenEncoded`
- `404` capy/IssueNotFound: `capy_IssueNotFoundEncoded`
- `429` capy/RateLimited: `capy_RateLimitedEncoded`

## Example

```bash
curl -X GET "https://api.capy.ai/api/v1/issues/{code}/timeline" \
  -H "Authorization: Bearer $CAPY_API_KEY"
```

## Referenced schemas

```json
{
  "IssueTimelineEncoded": {
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IssueTimelineEventEncoded"
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  },
  "IssueTimelineEventEncoded": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "kind": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "created",
              "status_changed",
              "priority_changed",
              "assignee_changed",
              "title_changed",
              "description_edited",
              "parent_set",
              "sub_issue_added",
              "sub_issue_removed",
              "linked",
              "unlinked",
              "visibility_changed",
              "state_changed"
            ]
          },
          {
            "$ref": "#/components/schemas/UnsupportedMember_6"
          }
        ]
      },
      "actor": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/IssueActorEncoded"
          },
          {
            "type": "null"
          }
        ]
      },
      "issueCode": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "The sub-issue the event happened on; null for the issue in the path."
      },
      "from": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "The old value of a title, priority, visibility, or state name change, or the old parent's code."
      },
      "to": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "The new value of a title, priority, visibility, or state name change, or the new parent's code."
      },
      "added": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IssueActorEncoded"
        }
      },
      "removed": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IssueActorEncoded"
        }
      },
      "issue": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "The other issue's code for a sub-issue or relation event; null when the key cannot read it."
      },
      "relation": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "blocked_by",
              "blocks",
              "related"
            ]
          },
          {
            "$ref": "#/components/schemas/UnsupportedMember_7"
          }
        ]
      },
      "pullRequest": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "`owner/repo#number` for a pull request link event."
      },
      "thread": {
        "$ref": "#/components/schemas/IssueThreadEncoded"
      },
      "createdAt": {
        "type": "string"
      }
    },
    "required": [
      "id",
      "kind",
      "actor",
      "issueCode",
      "createdAt"
    ],
    "additionalProperties": false
  },
  "UnsupportedMember_6": {
    "type": "string"
  },
  "IssueActorEncoded": {
    "type": "object",
    "properties": {
      "kind": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "user",
              "thread"
            ]
          },
          {
            "$ref": "#/components/schemas/UnsupportedMember_4"
          }
        ]
      },
      "id": {
        "type": "string",
        "description": "A user id for `user`, resolved by `GET /users`, or a thread id for `thread`."
      },
      "code": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "The thread's reference, such as `SCO-123`; null for a user or a thread the key cannot read."
      }
    },
    "required": [
      "kind",
      "id",
      "code"
    ],
    "additionalProperties": false
  },
  "UnsupportedMember_4": {
    "type": "string"
  },
  "UnsupportedMember_7": {
    "type": "string"
  },
  "IssueThreadEncoded": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "code": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "id",
      "code"
    ],
    "additionalProperties": false
  },
  "capy_InvalidRequestEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/InvalidRequest"
        ]
      },
      "message": {
        "type": "string"
      }
    },
    "required": [
      "_tag",
      "message"
    ],
    "additionalProperties": false
  },
  "capy_UnauthorizedEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/Unauthorized"
        ]
      }
    },
    "required": [
      "_tag"
    ],
    "additionalProperties": false
  },
  "capy_ForbiddenEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/Forbidden"
        ]
      }
    },
    "required": [
      "_tag"
    ],
    "additionalProperties": false
  },
  "capy_IssueNotFoundEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/IssueNotFound"
        ]
      }
    },
    "required": [
      "_tag"
    ],
    "additionalProperties": false
  },
  "capy_RateLimitedEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/RateLimited"
        ]
      },
      "retryAfterSeconds": {
        "type": "integer"
      }
    },
    "required": [
      "_tag",
      "retryAfterSeconds"
    ],
    "additionalProperties": false
  }
}
```

Full document: https://docs.capy.ai/openapi.json