---
title: "Update Todo"
url: "https://dev-portal.dehaven.org/apis/to-dos-1/versions/b3b098cb-0ab1-4df8-9b82-b3b88df5bb75/operations/patch-todos-id"
---

> Full API specification: https://dev-portal.dehaven.org/apis/to-dos-1/versions/b3b098cb-0ab1-4df8-9b82-b3b88df5bb75.md

# Update Todo (deprecated)

`PATCH` `/todos/{id}`

Operation ID: `patch-todos-id`

Don't use this endpoint. Notice it's deprecated. *Markdown is supported in descriptions. Add information here for users to get accustomed to endpoints*

## Path parameters

- `id` (string, required) - ID of the Todo

## Request body

Content types: `application/json`

## Responses

- `200` - Todo Updated
- `403` - Action not allowed
- `404` - Resource not found

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: To-dos
  version: 1.0.0
servers:
  - url: https://todos.stoplight.io
    description: Production
  - description: Sandbox
    url: https://todos-sandbox.stoplight.io
paths:
  /todos/{id}:
    parameters:
      - $ref: "#/components/parameters/ID"
    patch:
      summary: Update Todo
      operationId: patch-todos-id
      responses:
        "200":
          description: Todo Updated
        "403":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      deprecated: true
      description: >-
        Don't use this endpoint. Notice it's deprecated.


        *Markdown is supported in descriptions. Add information here for users
        to get accustomed to endpoints*
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Todos"
      security:
        - API Key: []
security:
  - API Key: []
components:
  parameters:
    ID:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: ID of the Todo
  responses:
    Unauthorized:
      description: Action not allowed
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            required:
              - message
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            title: Error
            type: object
            description: A standard error object.
            x-tags:
              - Common
            properties:
              status:
                type: string
                description: A code.
              error:
                type: string
            required:
              - status
              - error
  schemas:
    Todos:
      description: I'm a model's description.
      type: object
      title: Todo
      properties:
        id:
          type: number
          minimum: 0
          maximum: 9999
          description: ID of the task
          readOnly: true
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: Name of the task
        completed:
          type: boolean
          default: false
          description: Boolean indicating if the task has been completed or not
        completed_at:
          type: string
          format: date-time
          description: Time when the task was completed
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: Time when the task was created
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: Time when the task was updated
          readOnly: true
      required:
        - id
        - name
        - completed_at
        - created_at
        - updated_at
  securitySchemes:
    API Key:
      name: apikey
      type: apiKey
      in: query
      description: Just use `123`. It's super secure ;)
```
