Disconnect desktop
POST
/wp-json/wp2/studio-sync/v1/desktop/disconnect
const url = 'https://example.com/wp-json/wp2/studio-sync/v1/desktop/disconnect';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connection_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/wp-json/wp2/studio-sync/v1/desktop/disconnect \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connection_id": "example" }'Revokes the current connection. Body must include connection_id, and it must match the Bearer session (otherwise 403).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
connection_id
required
Studio Sync connection id.
string
Example
{ "connection_id": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
success
Success flag (often Studio/License envelope).
boolean
connection_id
Studio Sync connection id.
string
status
Status (build, post, or license — depending on the operation).
string
Examplegenerated
{ "success": true, "connection_id": "example", "status": "example"}Studio_sync_bad_disconnect_request
Media typeapplication/json
object
code
Machine-readable error or event code.
string
message
Message text (log, PIN, or password reset).
string
data
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Studio_sync_missing_auth / studio_sync_invalid_token
Media typeapplication/json
object
code
Machine-readable error or event code.
string
message
Message text (log, PIN, or password reset).
string
data
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Studio_sync_connection_mismatch
Media typeapplication/json
object
code
Machine-readable error or event code.
string
message
Message text (log, PIN, or password reset).
string
data
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}