todo:close

Description: Close (mark as completed) a todo by ID.


Request Schema

{
  "payload": {
    "type": "todo:close",
    "id": "TODO_ID_TO_CLOSE"
  },
  "signature": "payload_ed25519_hex_signature",
  "source_public_key": "your_client_public_key"
}

Request Attributes

Authentication Behavior

  • Account-based auth (API token or whitelist): Can close any todo belonging to the account
  • Membership-based auth: Can only close todos assigned to the authenticated person’s membership

Error Handling

The close operation is processed asynchronously. Check the message status for errors:

  • Record not found: Todo does not exist or taskable does not belong to the account
  • Validation failed: Invalid payload or data validation error
  • Authorization failed: Membership user attempting to close another person’s todo
  • General error: Unexpected processing error

Message status will be set to failed with error details in these cases.

Response Schema

{
  "source_public_key": "community_public_key",
  "source_site": {
    "protocol": "https",
    "fqdn": "arkipel.localhost:3000"
  },
  "created_at": "2025-03-18T10:30:00Z",
  "signature": "8b6392d5550605bd6ccddf9c21ebec470de4b44e4b4deb746076e37ab61c5346e07e7c7c7cebb5bbee41cdd92a476bcd3f02373d146ec165b31c31fc31c9ce0d",
  "payload": {
    "message_id": "6916452112f746b2b4cf48c1",
    "type": "todo:close"
  }
}

Response Attributes

  • payload.message_id - String - The unique identifier for the async processing message. Use this to check the processing status.
  • payload.type - String - Always “todo:close”

Processing Status

After receiving the response, poll the message status using the message_id to determine if the close operation succeeded:

  • queued - Message is waiting to be processed
  • processing - Message is currently being processed
  • persisted - Todo was successfully closed
  • failed - An error occurred (check error details)