curl --request PATCH \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"enabled": true,
"is_default": true
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}"
payload = {
"enabled": True,
"is_default": True
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true, is_default: true})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}', 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://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'is_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"is_default\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "dest_01JABCDEF",
"object": "destination",
"channel": "x",
"display_name": "@openpmm",
"status": "ready",
"unavailable_reason": "reauthorization_required",
"is_default": true,
"provider_origin": "<string>",
"external_id": "1844029112345678901",
"connected_at": "2026-08-09T12:00:00.000Z",
"expires_at": "2026-08-09T12:00:00.000Z",
"capabilities": {
"max_body_items": 13,
"body_text_limit": {
"maximum": 25000,
"unit": "weighted_characters"
},
"allowed_privacy_statuses": [
"public"
],
"minimum_upload_lead_minutes": 720
},
"version": 1,
"queue_policy": {
"enabled_weekdays": [
"monday"
],
"windows": [
{
"id": "<string>",
"weekdays": [
"monday"
],
"start_time": "08:00",
"end_time": "11:00"
}
]
}
}Update Destination
Enable or disable a destination. You can also make it the default destination for its channel. Send the current ETag in If-Match.
curl --request PATCH \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"enabled": true,
"is_default": true
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}"
payload = {
"enabled": True,
"is_default": True
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true, is_default: true})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}', 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://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'is_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"is_default\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/destinations/{destination_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "dest_01JABCDEF",
"object": "destination",
"channel": "x",
"display_name": "@openpmm",
"status": "ready",
"unavailable_reason": "reauthorization_required",
"is_default": true,
"provider_origin": "<string>",
"external_id": "1844029112345678901",
"connected_at": "2026-08-09T12:00:00.000Z",
"expires_at": "2026-08-09T12:00:00.000Z",
"capabilities": {
"max_body_items": 13,
"body_text_limit": {
"maximum": 25000,
"unit": "weighted_characters"
},
"allowed_privacy_statuses": [
"public"
],
"minimum_upload_lead_minutes": 720
},
"version": 1,
"queue_policy": {
"enabled_weekdays": [
"monday"
],
"windows": [
{
"id": "<string>",
"weekdays": [
"monday"
],
"start_time": "08:00",
"end_time": "11:00"
}
]
}
}Authorizations
Send an account API key in the Authorization: Bearer <key> header.
Headers
Optional request ID. OpenPMM returns this value when it is valid. Otherwise, OpenPMM creates a request ID.
128The current ETag for the resource. This value prevents an update to an old version.
Path Parameters
Unique workspace ID.
"ws_01JABCDEF"
Unique destination ID.
"dest_01JABCDEF"
Body
Destination settings to update.
Response
The updated destination.
Unique destination ID.
"dest_01JABCDEF"
Object type.
"destination"Channel that receives posts for this destination.
bluesky, facebook, instagram, threads, mastodon, x, linkedin, tiktok, youtube "x"
Provider account or page name.
"@openpmm"
Current publishing status. Only ready destinations accept posts.
ready, disabled, reauthorization-required, unavailable Reason the destination cannot accept posts. This value is null when the status is ready or disabled.
reauthorization_required, provider_identity_missing, provider_error Whether new posts for this channel use this destination by default.
Provider origin. Mastodon destinations use the instance origin.
Provider account or page ID.
"1844029112345678901"
Time when the provider connection was created.
"2026-08-09T12:00:00.000Z"
Time when the current provider access expires.
"2026-08-09T12:00:00.000Z"
Publishing limits for this destination.
Show child attributes
Show child attributes
Version used to update the destination with an ETag.
x >= 0Weekly queue windows for this destination.
Show child attributes
Show child attributes
