Sign out
curl --request POST \
--url https://posted-api.example.com/api/auth/logoutimport requests
url = "https://posted-api.example.com/api/auth/logout"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://posted-api.example.com/api/auth/logout', 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://posted-api.example.com/api/auth/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://posted-api.example.com/api/auth/logout"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posted-api.example.com/api/auth/logout")
.asString();require 'uri'
require 'net/http'
url = URI("https://posted-api.example.com/api/auth/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Sign out
Deletes the supplied session if present and clears its cookie. Browser mutations carrying cookies require the trusted UI Origin.
POST
/
api
/
auth
/
logout
Sign out
curl --request POST \
--url https://posted-api.example.com/api/auth/logoutimport requests
url = "https://posted-api.example.com/api/auth/logout"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://posted-api.example.com/api/auth/logout', 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://posted-api.example.com/api/auth/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://posted-api.example.com/api/auth/logout"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posted-api.example.com/api/auth/logout")
.asString();require 'uri'
require 'net/http'
url = URI("https://posted-api.example.com/api/auth/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}No signed-in session is required. Endpoint-specific tokens, setup secrets or challenges may still be required.
Deletes the supplied session if present and clears its cookie. Browser mutations carrying cookies require the trusted UI Origin.
Request conventions · API keys · MCP connections
Response
Successful response. Examples are illustrative; field values vary by record.
Was this page helpful?
