curl --request POST \
--url https://apix.us.amity.co/api/v4/stories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text": "example text",
"fileId": "<string>",
"imageDisplayMode": "fit"
},
"dataType": "text",
"targetType": "community",
"targetId": "public_community_id",
"referenceId": "<string>",
"items": [
{
"type": "hyperlink",
"data": {
"url": "https://www.google.com",
"customText": "Google"
}
}
],
"metadata": {
"anything": "you want"
}
}
'Create a story
curl --request POST \
--url https://apix.us.amity.co/api/v4/stories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text": "example text",
"fileId": "<string>",
"imageDisplayMode": "fit"
},
"dataType": "text",
"targetType": "community",
"targetId": "public_community_id",
"referenceId": "<string>",
"items": [
{
"type": "hyperlink",
"data": {
"url": "https://www.google.com",
"customText": "Google"
}
}
],
"metadata": {
"anything": "you want"
}
}
'Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Main data contained in the story, required only 1 field depends on dataType. The size of this object must be less than 10 KB.
Show child attributes
text, image, video where to create story to. currently limited to community only
community Resource public id depends on target type (ex. target type is community, target id will be community public id)
"public_community_id"
the id used for reference when optimistically create the story
List of items contained in story. Currently only support hyperlink item. Only one hyperlink item is allowed per story.
10Show child attributes
Metadata of the story. The size of this object must be less than 5 KB
{ "anything": "you want" }
Create Result
Create story response payload
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes