Ship and share
Sharing
Conversations published as read-only pages
On this page(4 sections)
What is currently shared, publishing a conversation, re-rendering one from how it stands now, and taking it down. As with the outbox, the page itself is the read.
GET/shareConversations published as pages
Every conversation that has been turned into a read-only page, with its link. There is no call to read one back: the page itself is the read, and it answers to anyone who has the link.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
sharesEvery conversation currently published as a… | object[] |
idThe share's own id, minted fresh… | string |
conversationIdWhich conversation it was taken from | string |
titleThe title on the page, which… | string |
detailHow much travels: the two speakers'… | "messages" | "everything" |
sharedAtWhen the snapshot was taken, in… | number |
messagesHow many messages are behind the… | number |
urlThe page's address | string |
Try itanswered in this tab
curl
curl "$SANDBOX/share" \
-H "x-intentic-control: $INTENTIC_TOKEN"TypeScript
import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.share.list();POST/sharePublish a conversation
Renders a conversation into a page anybody with the link can read, without signing in. Answers with the link, so nothing has to be listed again to find it.
What you send
| Field | Type | Where |
|---|---|---|
conversationIdrequiredWhich conversation to publish | string | body |
titlerequiredThe title for the page | string | body |
detailrequiredHow much to publish | "messages" | "everything" | body |
What comes back
| Field | Type |
|---|---|
idThe share's own id, minted fresh… | string |
conversationIdWhich conversation it was taken from | string |
titleThe title on the page, which… | string |
detailHow much travels: the two speakers'… | "messages" | "everything" |
sharedAtWhen the snapshot was taken, in… | number |
messagesHow many messages are behind the… | number |
urlThe page's address | string |
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/share" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"conversationId":"nightly-changelog","title":"Update the changelog","detail":"messages"}'TypeScript
import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.share.create({
"conversationId": "nightly-changelog",
"title": "Update the changelog",
"detail": "messages"
});POST/share/updateRefresh a published page
Re-renders an existing page from the conversation as it stands now. Same link, newer contents.
What you send
| Field | Type | Where |
|---|---|---|
idrequiredWhich share to re-take | string | body |
What comes back
| Field | Type |
|---|---|
idThe share's own id, minted fresh… | string |
conversationIdWhich conversation it was taken from | string |
titleThe title on the page, which… | string |
detailHow much travels: the two speakers'… | "messages" | "everything" |
sharedAtWhen the snapshot was taken, in… | number |
messagesHow many messages are behind the… | number |
urlThe page's address | string |
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/share/update" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"id":"a1b2c3d4"}'TypeScript
import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.share.update({
"id": "a1b2c3d4"
});POST/share/removeUnpublish a conversation
Takes the page down, so the link stops answering.
What you send
| Field | Type | Where |
|---|---|---|
idrequiredWhich share to take down | string | body |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/share/remove" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"id":"a1b2c3d4"}'TypeScript
import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.share.remove({
"id": "a1b2c3d4"
});More in Ship and share