curl --request POST \
--url https://api.matrices.com/v1/connections/{connectionId}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedVersion: 2})
};
fetch('https://api.matrices.com/v1/connections/{connectionId}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/connections/{connectionId}/revoke"
payload = { "expectedVersion": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/connections/{connectionId}/revoke"
payload := strings.NewReader("{\n \"expectedVersion\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Revoke a connection
Atomically disables local issuance and destroys encrypted credential material before one best-effort remote revocation attempt. API-key and user principals must send the current positive expectedVersion. Agent principals must send an empty object and an Idempotency-Key; platform derives the active caller identity and permits only an exact identity-owned connection. A visible workspace-owned connection returns connection_not_revocable and requires an operator.
curl --request POST \
--url https://api.matrices.com/v1/connections/{connectionId}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedVersion: 2})
};
fetch('https://api.matrices.com/v1/connections/{connectionId}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/connections/{connectionId}/revoke"
payload = { "expectedVersion": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/connections/{connectionId}/revoke"
payload := strings.NewReader("{\n \"expectedVersion\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Required for AgentLeaseBearer principals. Replays the original identical agent revocation and rejects reuse for another connection.
Path Parameters
Body
Required and positive for API-key and user principals. Agent principals must omit it.
x >= 1Response
Revoked safe connection tombstone.
Safe connection metadata. Credential material is never returned.
Show child attributes
Show child attributes