Skip to content

Conversation routes: update, delete

The Conversation Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Conversation, one group of Conversation routes.

Conversation.update

Changes the given properties of a Conversation. Verb page.

Text
PATCH /{namespace}/conversations/{id}

Path: id. Body, as JSON: the other inputs. Emits Conversation.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Conversation.
subjectstringWhat the Thread is about.
answeredAtdatetimeWhen a Worker last answered.
resolutionstringHow it was resolved: the Customer said so, or 72 hours passed after an answer with no reply.

Returns

OutputTypeRequiredDescription
conversationConversationrequiredThe Conversation.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/conversations/conversation_0vg6SDjB6k \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answeredAt":"2026-10-22T12:00:00Z"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "conversation": {
    "$id": "https://api.sb/leaseline.app/conversations/conversation_0vg6SDjB6k",
    "$type": "Conversation",
    "subject": "Example subject",
    "answeredAt": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Conversation.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Conversation.delete

Deletes a Conversation: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/conversations/{id}

Path: id. Emits Conversation.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Conversation.

Returns

OutputTypeRequiredDescription
conversationConversationrequiredThe Conversation.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X DELETE https://api.sb/leaseline.app/conversations/conversation_0vg6SDjB6k \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "conversation": {
    "$id": "https://api.sb/leaseline.app/conversations/conversation_0vg6SDjB6k",
    "$type": "Conversation",
    "subject": "Example subject",
    "answeredAt": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Conversation.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}