API Docs
/
No Results Found
Stories

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

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.

Download Stories OpenAPI Document
End Points

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

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-data with a single file attachment. An optional caption can accompany the media.
Note:
  • 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 as multipart/form-data and attach the media in the file field. You can include an optional caption along 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

caption
string
(Required)
Text content or caption of the story.
Maximum length: 2,000 characters.
font
string
Font family for the text story.
Allowed values: bangers | chivo | delius | gabriela | modernantiqua | nunito | oswald | pacifico | quicksand | rochester | rokkitt | shortstack | spacemono
background
string
Background color for the text story.
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
key
string
Client-generated unique story key used as an acknowledgement key. Echoed back in the response as `ack_key`.
Maximum length: 100 characters.
linkdetails
object
Link unfurl metadata for a URL included in the story caption.

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).
Show Sub-Attributes arrow
title
string
Page title of the linked content.
Maximum length: 300 characters.
description
string
Page description or summary of the linked content.
Maximum length: 1,000 characters.
url
uri
Canonical URL of the linked page.
Maximum length: 2,500 characters.
mimetype
string
MIME type of the linked content.
linktype
string
Unfurl type (e.g., link, video).
faviconlink
uri
URL to the site favicon.
Maximum length: 300 characters.
author_name
string
Name of the content author.
Maximum length: 100 characters.
author_url
uri
URL to the author's profile or page.
Maximum length: 300 characters.
providername
string
Name of the content provider.
Maximum length: 100 characters.
providerurl
uri
URL of the content provider.
Maximum length: 300 characters.
imgurl
uri
URL of the preview image.
Maximum length: 300 characters.
thumbnailurl
uri
URL of the thumbnail image.
Maximum length: 2,500 characters.
thumbnail_height
string
Height of the thumbnail image.
Maximum length: 300 characters.
thumbnail_width
string
Width of the thumbnail image.
Maximum length: 300 characters.
html
string
Embedded HTML content (e.g., an iframe snippet).
Maximum length: 1,000 characters.
width
long
Media width in pixels.
height
long
Media height in pixels.
iframe_url
uri
Embeddable iframe URL for the linked content.
Maximum length: 300 characters.
giphyLink
boolean
Indicates whether the link points to a Giphy GIF.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" } }

Response Example

{ "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

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
string
(Required)
The token of the media file to download. Use the file_token value returned in the meta object of the response to the Upload a new story API.

Request Example

Click to copy
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'

Response Example

"<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

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

STORY_ID
string
(Required)
The unique ID of the story to delete.

Request Example

Click to copy
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'

Response Example

{...}