Update a work item type's audiences
Attach the audiences in add to a 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 type restricts every work item of that type. 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.
Only types this project owns
The project route reads every type the project uses, but changes only the types it owns. A workspace type imported into the project returns 409 work_item_types_managed_at_workspace. Change its audiences with Update a workspace work item type's audiences instead. This check 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.
project_id:requiredstring (uuid)The project that owns the type.
pk:requiredstring (uuid)The id of the 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
projects.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 configure this project's work item types. |
404 | not_found | No such type in this project, the type belongs to another project, or no such workspace or project. |
405 | method_not_allowed | You sent PUT. Use PATCH. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
409 | work_item_types_managed_at_workspace | The type is a workspace type. Change its audiences on the workspace route. |
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/projects/4af68566-94a4-4eb3-94aa-50dc9427067b/work-item-types/d0367de2-020a-42b1-a9cc-aba9ae4ad8af/audiences/" \
-H "X-Api-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"add": ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"]
}'import requests
response = requests.patch(
"https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b"
"/work-item-types/d0367de2-020a-42b1-a9cc-aba9ae4ad8af/audiences/",
headers={"X-Api-Key": "your-api-key"},
json={"add": ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"]},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b" +
"/work-item-types/d0367de2-020a-42b1-a9cc-aba9ae4ad8af/audiences/",
{
method: "PATCH",
headers: { "X-Api-Key": "your-api-key", "Content-Type": "application/json" },
body: JSON.stringify({
add: ["8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312"],
}),
},
);
const data = await response.json();{
"audiences": [
{
"id": "8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312",
"name": "Security response",
"logo_props": {},
"is_active": true
}
]
}{
"type": "conflict",
"code": "work_item_types_managed_at_workspace",
"detail": "This work item type belongs to the workspace. Change its audiences on the workspace work item types route."
}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 with ?project_id= first.

