Visitor routes: update, delete
The Visitor Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.
Reference for Visitor, one group of Visitor routes.
Visitor.update
Changes the given properties of a Visitor. Verb page.
PATCH /{namespace}/ visitors/ {id}Path: id. Body, as JSON: the other inputs. Emits Visitor.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Visitor. |
firstSeenAt | datetime | When the first request arrived. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
visitor | Visitor | required | The Visitor. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X PATCH https: //api.sb/ leaseline.app/ visitors/ visitor_M5gHadysq9 \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"firstSeenAt": "2026-10-22T12: 00: 00Z"}'{
"api": "https: //api.sb/ leaseline.app",
"visitor": {
"$id": "https: //api.sb/ leaseline.app/ visitors/ visitor_M5gHadysq9",
"$type": "Visitor",
"firstSeenAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Visitor.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Visitor.delete
Deletes a Visitor: a soft delete that keeps its history, undone by Thing.restore. Verb page.
DELETE /{namespace}/ visitors/ {id}Path: id. Emits Visitor.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Visitor. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
visitor | Visitor | required | The Visitor. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X DELETE https: //api.sb/ leaseline.app/ visitors/ visitor_M5gHadysq9 \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"visitor": {
"$id": "https: //api.sb/ leaseline.app/ visitors/ visitor_M5gHadysq9",
"$type": "Visitor",
"firstSeenAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Visitor.delete",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}