Skip to main content
PATCH
/
public
/
v1
/
docs
/
{docId}
Update Document
curl --request PATCH \
  --url https://api.copera.ai/public/v1/docs/{docId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "icon": {
    "type": "<string>",
    "value": "<string>"
  },
  "cover": {
    "type": "<string>",
    "value": "<string>"
  }
}
'
{
  "_id": "<string>",
  "title": "<string>",
  "owner": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "icon": {
    "type": "<string>",
    "value": "<string>"
  },
  "cover": {
    "type": "<string>",
    "value": "<string>"
  },
  "starred": true,
  "parent": "<string>"
}

Overview

Updates the properties of an existing document. Only the fields provided in the request body are updated.

Request Body

  • title (optional): The new title for the document.
  • icon (optional): An emoji or icon identifier.
  • cover (optional): A cover image URL.

Response

Returns the updated document object.

Authorizations

Authorization
string
header
required

Bearer token

Path Parameters

docId
string
required

ObjectId

Required string length: 24
Pattern: ^[0-9a-fA-F]{24}$

Body

application/json
title
string

New document title

icon
object
cover
object

Response

Default Response

_id
string
required
title
string
required
owner
string
required
createdAt
string
required
updatedAt
string
required
icon
object
cover
object
starred
boolean
parent
string