Document share remove
POST
https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/share/remove
Remove one recipient's access
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Path parameters
knowledge_base
string
Required
The library.
Validation:
the library's UUIDStored in
knowledge_bases.idarticle
string
Required
The document.
Validation:
the document's UUIDStored in
knowledge_articles.idRequest body
email
string
Required
Recipient email — there is no picker of existing users.
Validation:
required|string|email|max:255Errors
| Status | Meaning | Body |
|---|---|---|
404 |
Document not found, or it does not belong to that library | {"message":"No query results for model [App\\Models\\KnowledgeArticle] <id>."} |
403 |
Policy denied — outside your organization, or you cannot write to this resource | {"message":"This action is unauthorized."} |
422 |
Validation failed | {"message":"…","errors":{"field":["…"]}} |
401 |
Missing or invalid bearer token | |
403 |
Feature knowledge_docs not enabled for the account |
Notes
- Works whether the email is an active share or still a pending invite; removing an email with neither is a silent no-op (still 200).
curl --request POST \
--url https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/share/remove \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]"
}'
import requests
url = "https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/share/remove"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
"email": "[email protected]"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://app.sulus.ai/api/v1/kb/knowledge-bases/{knowledge_base}/articles/{article}/share/remove"
payload := strings.NewReader(`{
"email": "[email protected]"
}`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
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))
}
Response
200
{
"message": "Access removed."
}
Response — POST
/knowledge-bases/{knowledge_base}/articles/{article}/share/remove
200
{
"message": "Access removed."
}