Stories
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use Arattai's Stories feature to share moments with friends and family.
You can create stories using text, images, or videos to keep everyone updated. Once posted, stories are visible for 24 hours. Video stories can be up to 60 seconds long. To view and have your stories viewed by a contact, both of you must be on each other's contact lists.
With the Arattai Stories API, you can upload text caption stories featuring colored backgrounds and various fonts, as well as image media stories. You can also retrieve or delete existing stories.
Upload a new story
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use this API to upload a text story or a media story (image or file) and keep everyone updated on your moments.
Story types:
- Text story: Send as
application/json. Required field:caption. - Media story: Send as
multipart/form-datawith a singlefileattachment. An optionalcaptioncan accompany the media.
- The sample request shown below illustrates a text story submission using
application/json. If you are uploading an image or video story instead, send the request asmultipart/form-dataand attach the media in thefilefield. You can include an optionalcaptionalong with the uploaded file. - Maximum allowed file size for story uploads is 50 MB.
Threshold limit: 50 requests per hour per user
Number of API calls allowed within an hour.
Lock period: 10 minutes
Wait time before consecutive API requests.
OAuth Scope : Arattai.Stories.UPDATE
Arguments
Maximum length: 2,000 characters.
Allowed values: bangers | chivo | delius | gabriela | modernantiqua | nunito | oswald | pacifico | quicksand | rochester | rokkitt | shortstack | spacemono
Allowed values: #A99561 | #6D6D6E | #065B5E | #88206D | #922E38 | #4D3F93 | #48423B | #846B13 | #2C3136 | #2A83B1 | #6E217A | #7D254A | #1D375D | #2A2527 | #996400 | #1E252E | #39765D | #55210D | #003C40 | #817D13 | #385578 | #20535E | #2A6834 | #4E5F29 | #E3AE00 | #B03052 | #148C50 | #B030A5 | #6075DB | #2B2F33 | #00A4B2 | #0B60B0 | #DA1682 | #C40C0C | #6C48C5 | #3683B2 | #005C46 | #640D6B | #359DB7 | #E36414 | #6F4E37 | #40A578 | #4A598A | #91BF26 | #8A8221
Maximum length: 100 characters.
Provide this object when the story caption contains a URL and you want to include a rich link preview.
Maximum length: 10,000 characters (serialized object size).
Maximum length: 300 characters.
Maximum length: 1,000 characters.
Maximum length: 2,500 characters.
Maximum length: 300 characters.
Maximum length: 100 characters.
Maximum length: 300 characters.
Maximum length: 100 characters.
Maximum length: 300 characters.
Maximum length: 300 characters.
Maximum length: 2,500 characters.
Maximum length: 300 characters.
Maximum length: 300 characters.
Maximum length: 1,000 characters.
Maximum length: 300 characters.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN");
response = invokeUrl
[
url: "https://api.arattai.in/restapi/v4/stories"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.arattai.in/restapi/v4/stories")
.post(body)
.addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.arattai.in/restapi/v4/stories', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.arattai.in")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/restapi/v4/stories", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.arattai.in",
"port": null,
"path": "/restapi/v4/stories",
"headers": {
"Authorization": "Bearer REPLACE_BEARER_TOKEN",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
var client = new RestClient("https://api.arattai.in/restapi/v4/stories");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.arattai.in/restapi/v4/stories"),
Headers =
{
{ "Authorization", "Bearer REPLACE_BEARER_TOKEN" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.arattai.in/restapi/v4/stories"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.arattai.in/restapi/v4/stories");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request POST \
--url https://api.arattai.in/restapi/v4/stories \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"caption": "Launch day is here! Stay tuned for exciting updates throughout the day.",
"font": "modernantiqua",
"background": "#A99561",
"key": "1611700924312"
}
{
"caption": "Check out this article!",
"key": "client-unique-key-456",
"linkdetails": {
"title": "Arattai Product Updates",
"description": "Latest features and improvements in Arattai.",
"url": "https://www.arattai.in/updates",
"imgurl": "https://www.arattai.in/images/preview.png"
}
}
{
"url": "/restapi/v4/stories",
"type": "story",
"data": {
"id": "2815532_1755325952724",
"owner": "64572538",
"added_time": 1755325952724,
"validity": 1755412352724,
"ack_key": "client-unique-key-123",
"caption": "Launch day is here!",
"type": "text",
"font": "Modern Antiqua",
"background": "#A99561"
}
}
{
"url": "/restapi/v4/stories",
"type": "story",
"data": {
"id": "64572038_1755496773183",
"owner": "64572538",
"added_time": 1755496773183,
"validity": 1755583173183,
"ack_key": "1571634226126549470_64572538_1755495673711",
"caption": "Our weekend team adventure at the lakeside.",
"type": "media",
"meta": {
"content_type": "image/png",
"file_token": "z7b226664223a7b22735f6964223a223634333"
}
}
}
Download story media
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use this API to download the media file attached to a story. Pass the file_token returned in the meta object of the Upload a new story API response.
This endpoint is intended for media stories only. It returns the original media file as binary (raw) content.
Threshold limit: 100 requests per 10 min per user
Number of API calls allowed within 10 minutes.
Lock period: 10 minutes
Wait time before consecutive API requests.
OAuth Scope : Arattai.Stories.READ
Path Parameters
file_token value returned in the meta object of the response to the Upload a new story API.headers_data = Map();
headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN");
response = invokeUrl
[
url: "https://api.arattai.in/restapi/v4/stories/FILE_TOKEN"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.arattai.in/restapi/v4/stories/FILE_TOKEN")
.get()
.addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};
fetch('https://api.arattai.in/restapi/v4/stories/FILE_TOKEN', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.arattai.in")
headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }
conn.request("GET", "/restapi/v4/stories/FILE_TOKEN", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.arattai.in",
"port": null,
"path": "/restapi/v4/stories/FILE_TOKEN",
"headers": {
"Authorization": "Bearer REPLACE_BEARER_TOKEN"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://api.arattai.in/restapi/v4/stories/FILE_TOKEN");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.arattai.in/restapi/v4/stories/FILE_TOKEN"),
Headers =
{
{ "Authorization", "Bearer REPLACE_BEARER_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.arattai.in/restapi/v4/stories/FILE_TOKEN"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.arattai.in/restapi/v4/stories/FILE_TOKEN");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.send(data);
curl --request GET \
--url https://api.arattai.in/restapi/v4/stories/FILE_TOKEN \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
"<binary content>"
Delete a story
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use this API to delete a story owned by the authenticated user. On successful deletion, listeners are notified via push notification.
Threshold limit: 100 requests per 10 min per user
Number of API calls allowed within 10 minutes.
Lock period: 10 minutes
Wait time before consecutive API requests.
OAuth Scope : Arattai.Stories.DELETE
Path Parameters
headers_data = Map();
headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN");
response = invokeUrl
[
url: "https://api.arattai.in/restapi/v4/stories/STORY_ID"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.arattai.in/restapi/v4/stories/STORY_ID")
.delete(null)
.addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'DELETE', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};
fetch('https://api.arattai.in/restapi/v4/stories/STORY_ID', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.arattai.in")
headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }
conn.request("DELETE", "/restapi/v4/stories/STORY_ID", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "api.arattai.in",
"port": null,
"path": "/restapi/v4/stories/STORY_ID",
"headers": {
"Authorization": "Bearer REPLACE_BEARER_TOKEN"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://api.arattai.in/restapi/v4/stories/STORY_ID");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://api.arattai.in/restapi/v4/stories/STORY_ID"),
Headers =
{
{ "Authorization", "Bearer REPLACE_BEARER_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.arattai.in/restapi/v4/stories/STORY_ID"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://api.arattai.in/restapi/v4/stories/STORY_ID");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.send(data);
curl --request DELETE \
--url https://api.arattai.in/restapi/v4/stories/STORY_ID \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{...}