---
title: "/todos/{todoId}"
url: "https://developers.rest.rodeo/apis/todos/versions/7d1617fd-92fe-4136-8be7-b2acec2c30db/operations/getTodo"
---

> Full API specification: https://developers.rest.rodeo/apis/todos/versions/7d1617fd-92fe-4136-8be7-b2acec2c30db.md

# /todos/{todoId}

`GET` `/todos/{todoId}`

Operation ID: `getTodo`

Returns a single todo by id.

## Path parameters

- `todoId` (string, uuid, required) - The todo id.

## Responses

- `200` - The todo
- `401` - Missing or invalid bearer token
- `404` - No todo with this id
- `405` - Method not allowed

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Todos API
  version: 1.0.0
servers:
  - url: https://api.rest.rodeo/todos/api/v1
    description: Production
paths:
  /todos/{todoId}:
    get:
      operationId: getTodo
      summary: /todos/{todoId}
      description: Returns a single todo by id.
      parameters:
        - $ref: "#/components/parameters/TodoId"
      responses:
        "200":
          description: The todo
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Todo"
              examples:
                todo:
                  value:
                    id: 1f6e4c8a-2b3c-4d0f-9b0d-c7f2b6de4b1a
                    name: Book the rodeo
                    description: Reserve seats for the weekend show.
                    dueDate: 2026-10-15T17:00:00.000Z
                    completed: true
                    createdAt: 2026-09-29T09:12:00.000Z
                    updatedAt: 2026-09-29T10:00:00.000Z
                    completedAt: 2026-09-29T10:00:00.000Z
        "401":
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No todo with this id
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "405":
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
security:
  - bearerAuth: []
components:
  parameters:
    TodoId:
      name: todoId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: The todo id.
  schemas:
    Todo:
      type: object
      required:
        - id
        - name
        - description
        - dueDate
        - completed
        - createdAt
        - updatedAt
        - completedAt
      additionalProperties: false
      properties:
        id:
          type: string
          format: uuid
          description: The todo id.
        name:
          type: string
          description: The todo name.
          maxLength: 256
          minLength: 1
        description:
          type: string
          description: The todo description.
          maxLength: 2000
        dueDate:
          type: string
          format: date-time
          nullable: true
          description: When the todo is due, or null when it has no due date.
        completed:
          type: boolean
          description: Whether the todo has been completed.
        createdAt:
          type: string
          format: date-time
          description: When the todo was created. This is the billable event.
        updatedAt:
          type: string
          format: date-time
          description: When the todo was last updated.
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: When the todo was completed, or null while it is incomplete.
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
