curl --request PUT \
--url https://our-secret-api-url.com/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <x-api-key>' \
--form 'content=<string>' \
--form parentId=123import requests
url = "https://our-secret-api-url.com/post"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--"
headers = {
"X-API-KEY": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "multipart/form-data"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('content', '<string>');
form.append('parentId', '123');
const options = {
method: 'PUT',
headers: {'X-API-KEY': '<x-api-key>', Authorization: 'Bearer <token>'}
};
options.body = form;
fetch('https://our-secret-api-url.com/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://our-secret-api-url.com/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://our-secret-api-url.com/post"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://our-secret-api-url.com/post")
.header("X-API-KEY", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://our-secret-api-url.com/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": 123,
"snowflakeId": "<string>",
"user": {
"id": 123,
"username": "<string>",
"bio": "<string>",
"name": "<string>",
"image": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "post",
"hashtags": [
"<string>"
],
"content": "<string>",
"media": [
{
"id": 123,
"mediaUrl": "<string>",
"mimeType": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"repliesCount": 123,
"replies": "<array>",
"originalId": 123,
"parentId": 123,
"parent": "<unknown>",
"repostsCount": 123,
"reposts": [
123
],
"isSuspended": true,
"links": [
{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image": "<string>"
}
]
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Update Reply
Updates an existing post based on the ID supplied
curl --request PUT \
--url https://our-secret-api-url.com/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <x-api-key>' \
--form 'content=<string>' \
--form parentId=123import requests
url = "https://our-secret-api-url.com/post"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--"
headers = {
"X-API-KEY": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "multipart/form-data"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('content', '<string>');
form.append('parentId', '123');
const options = {
method: 'PUT',
headers: {'X-API-KEY': '<x-api-key>', Authorization: 'Bearer <token>'}
};
options.body = form;
fetch('https://our-secret-api-url.com/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://our-secret-api-url.com/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://our-secret-api-url.com/post"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://our-secret-api-url.com/post")
.header("X-API-KEY", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://our-secret-api-url.com/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": 123,
"snowflakeId": "<string>",
"user": {
"id": 123,
"username": "<string>",
"bio": "<string>",
"name": "<string>",
"image": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "post",
"hashtags": [
"<string>"
],
"content": "<string>",
"media": [
{
"id": 123,
"mediaUrl": "<string>",
"mimeType": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"repliesCount": 123,
"replies": "<array>",
"originalId": 123,
"parentId": 123,
"parent": "<unknown>",
"repostsCount": 123,
"reposts": [
123
],
"isSuspended": true,
"links": [
{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image": "<string>"
}
]
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}/post is used, similar to updating a post.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
API key required for authentication
Body
Updated post content and media
Response
Post updated successfully
ID of the post
Snowflake ID of the post
User who created the post
Show child attributes
Show child attributes
Creation timestamp of the post
Last update timestamp of the post
Type of the post
post, quote, repost List of hashtags associated with the post without the hashtag symbol (#), e.g. ['viral']
Content of the post
List of media items associated with the post
Show child attributes
Show child attributes
Number of replies to the post
List of replies to the post
ID of the original post if this is a reply, repost & quote repost
ID of the parent post if applicable
Parent post if applicable
Show child attributes
Show child attributes
Number of reposts of the post
List of userIds reposted
A boolean if the post/reply is suspended or not
List of OpenGraph details associated with the media
Show child attributes
Show child attributes
