Update a workspace work item type's audiences
Attach the audiences in add to a workspace work item type and detach the ones in remove, then get back the type's full audience list. Audiences you don't name stay as they are.
An active audience on a workspace type restricts every work item of that type in every project that uses it. Work items that have active audiences of their own are unaffected, because a work item's own audiences override its type's. Only people the type's audiences admit can create work items of the type. For anyone else, setting this type on a work item returns 400, as if the type didn't exist.
This route changes workspace types only. A type that a project owns returns 404 here. Change it with Update a work item type's audiences. Unlike the other workspace type writes, this one doesn't depend on the work item type mode.
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
pk:requiredstring (uuid)The id of the workspace work item type.
Body parameters
add:optionalarray of string (uuid)Audience ids to attach. Up to 100. Attaching an audience that is already attached changes nothing, and duplicate ids count once.
Every id must be an audience in this workspace. If one isn't, the request returns 400 and nothing is written. You can attach an inactive audience. It restricts nothing until it is turned on.
remove:optionalarray of string (uuid)Audience ids to detach. Up to 100. Detaching an audience that isn't attached, or an id that names no audience, changes nothing.
An id in both add and remove is a 400. A body with neither field, such as {}, changes nothing and returns the current list.
Scopes
workspaces.work_item_types:write
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | add or remove isn't an array of UUIDs, has more than 100 ids, or shares an id with the other. Or an id in add isn't an audience in this workspace. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | Work item security isn't on your plan, or is switched off. |
403 | forbidden | Your role or token scope can't edit the workspace's work item types. |
404 | not_found | No such workspace type, the type belongs to a project, or it's outside your tenant. |
405 | method_not_allowed | You sent PUT. Use PATCH. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
413 | payload_too_large | The request body is over the size limit. |
415 | unsupported_media_type | The Content-Type isn't one this endpoint accepts. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
curl -X PATCH \
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/" \
-H "X-Api-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"add": ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"],
"remove": ["33d89ed2-712a-4fc0-93cf-91eedbba5ef1"]
}'import requests
response = requests.patch(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/",
headers={"X-Api-Key": "your-api-key"},
json={
"add": ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"],
"remove": ["33d89ed2-712a-4fc0-93cf-91eedbba5ef1"],
},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/",
{
method: "PATCH",
headers: { "X-Api-Key": "your-api-key", "Content-Type": "application/json" },
body: JSON.stringify({
add: ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"],
remove: ["33d89ed2-712a-4fc0-93cf-91eedbba5ef1"],
}),
},
);
const data = await response.json();{
"audiences": [
{
"id": "8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312",
"name": "Security response",
"logo_props": {},
"is_active": true
}
]
}{
"type": "invalid_request",
"code": "invalid_request",
"detail": "One or more fields failed validation.",
"errors": [
{
"field": "remove",
"code": "invalid",
"message": "Listed in both add and remove: ['8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312']"
}
]
}What a PATCH changes
- The response is the type's full audience list after the change, oldest attachment first.
- Each audience the call attaches or detaches adds an
attachedordetachedentry to that audience's activity. Work items of the type get no activity entry. - The change applies as one transaction. If any id in
addfails, nothing is attached or detached.
You can restrict work items away from yourself
Attaching an active audience that doesn't admit you hides this type's work items from you, unless you are a workspace owner or admin, or the assignee or a subscriber of a given work item. Check List an audience's effective users first.

