Skip to content

Add 'body' parameter to Update Object API endpoint #5

@iappwebdev

Description

@iappwebdev

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing requests and didn't find any that were similar
  • I have considered creating a pull request instead and want to proceed

Clear and concise description of the problem

Currently, the PATCH /objects/{id} endpoint only allows updating object metadata (name, properties, etc.) but does not support updating the object's content body. This creates an inconsistency with the create endpoint and limits programmatic content management.

See relevent docs for create and update

Current Behavior

  • POST /objects (create) supports body parameter ✅
  • PATCH /objects/{id} (update) does NOT support body parameter ❌
  • To update object content, users must manually edit within the Anytype application

Expected Behavior

The update endpoint should support a body parameter to modify object content, similar to the create endpoint.

Use Case

Programmatic workflows need to update object content via API, such as:

  • Automated content generation
  • Content synchronization from external systems
  • Developer logs and documentation updates
  • Integration with content management systems

Suggested solution

Add body parameter support to the PATCH /objects/{id} endpoint, consistent with the create endpoint:

PATCH /objects/{object_id}
{
  "space_id": "xxx", 
  "name": "Updated Title",
  "body": "### Updated Content\nNew content here."
}

Alternative

Create a dedicated content update endpoint like PATCH /objects/{id}/content if adding body support to the main update endpoint is complex.

Additional context

This feature is essential for automated workflows like content generation, external system synchronization, and developer tooling. Currently users must manually edit content in the Anytype app, breaking automation pipelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions