curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach"
payload = {
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaces: ['Workspaces-example-5'],
metadata: {
source: 'MICROSOFT_DYNAMICS'
}
})
}
);
const data = await response.json();
console.log(data);
{
"id": 8545,
"name": "John Doe",
"email": "john.doe@example.com",
"workspaces": [
{
"id": 3,
"name": "Other Workspace",
"active": true,
"metadata": {},
"json_integrations": {
"integration_id": 16,
"is_active": true,
"source": "MICROSOFT_DYNAMICS",
"destination": null,
"status": "NOT_SEND",
"origin_external_id": "Workspaces-example-7",
"destination_external_id": null
},
"created_at": "2026-01-15 22:42:15",
"updated_at": "2026-01-15 22:42:15",
"pivot": {
"workspace_id": 3,
"user_id": 8545,
"percentage": 50
}
}
]
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Source is required in metadata"
}
{
"status": "ERROR",
"code": "AT004",
"message": "E_INVALID_JWT_TOKEN: jwt must be provided"
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Users
Detach Workspaces from User
Removes workspace access from a user in COR
PUT
/
v2
/
integrations
/
users
/
{userId}
/
detach
curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach"
payload = {
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaces: ['Workspaces-example-5'],
metadata: {
source: 'MICROSOFT_DYNAMICS'
}
})
}
);
const data = await response.json();
console.log(data);
{
"id": 8545,
"name": "John Doe",
"email": "john.doe@example.com",
"workspaces": [
{
"id": 3,
"name": "Other Workspace",
"active": true,
"metadata": {},
"json_integrations": {
"integration_id": 16,
"is_active": true,
"source": "MICROSOFT_DYNAMICS",
"destination": null,
"status": "NOT_SEND",
"origin_external_id": "Workspaces-example-7",
"destination_external_id": null
},
"created_at": "2026-01-15 22:42:15",
"updated_at": "2026-01-15 22:42:15",
"pivot": {
"workspace_id": 3,
"user_id": 8545,
"percentage": 50
}
}
]
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Source is required in metadata"
}
{
"status": "ERROR",
"code": "AT004",
"message": "E_INVALID_JWT_TOKEN: jwt must be provided"
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Detaches multiple workspaces from a specific user in your COR instance. This endpoint allows batch removal of workspace access from a user.
Prerequisites: Workspaces must be created first using the Create Workspace endpoint, and then attached to users using the Attach Workspace endpoint before they can be detached.
Response
The endpoint returns the complete user object with the remaining attached workspaces (after detachment). Each workspace includes apivot table with the relationship details (workspace_id, user_id, percentage).
Request Body Requirements
object
required
Show properties
Show properties
string
required
Integration source identifier. Must be one of:
JIRA, SALESFORCE, ADVERTMIND, QUICKBOOKS, ZAPIER, OKTA, MICROSOFT_DYNAMICS, GITHUB, MICROSOFT_TEAMS, VBS, SAP, GLOBANTarray
required
Array of workspace external IDs (strings) to detach from the user
Path Parameters
string
required
External user ID from your source system
curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach"
payload = {
"workspaces": ["Workspaces-example-5"],
"metadata": {
"source": "MICROSOFT_DYNAMICS"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/users/OKTA-USER-12345/detach',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaces: ['Workspaces-example-5'],
metadata: {
source: 'MICROSOFT_DYNAMICS'
}
})
}
);
const data = await response.json();
console.log(data);
{
"id": 8545,
"name": "John Doe",
"email": "john.doe@example.com",
"workspaces": [
{
"id": 3,
"name": "Other Workspace",
"active": true,
"metadata": {},
"json_integrations": {
"integration_id": 16,
"is_active": true,
"source": "MICROSOFT_DYNAMICS",
"destination": null,
"status": "NOT_SEND",
"origin_external_id": "Workspaces-example-7",
"destination_external_id": null
},
"created_at": "2026-01-15 22:42:15",
"updated_at": "2026-01-15 22:42:15",
"pivot": {
"workspace_id": 3,
"user_id": 8545,
"percentage": 50
}
}
]
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Source is required in metadata"
}
{
"status": "ERROR",
"code": "AT004",
"message": "E_INVALID_JWT_TOKEN: jwt must be provided"
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Was this page helpful?
⌘I

