Skip to main content

Create a plugin policy

Create a plugin policy. POST /api/openapi/v1/expert-suite-policies, scope admin.v1.expert-suites.manage.

  • Scope: admin.v1.expert-suites.manage
  • Permission: Manage plugins (expert-suites)
  • Permission type: Manage
  • Endpoint: POST/api/openapi/v1/expert-suite-policies

Authentication and request headers

Call with an application API key. This endpoint checks only the scope above; read, manage and execute permissions do not imply one another.
NameLocationTypeRequiredDescriptionExample
AuthorizationheaderstringYesApplication API key, passed as a Bearer token.Bearer qwk_***
X-Request-IdheaderstringNoOptional request tracing identifier; generated by the server if omitted.req-20260831-001

Request parameters

NameLocationTypeRequiredDescriptionExample
Idempotency-KeyheaderstringRequiredIdempotency key used to prevent duplicate submissions"<string>"
descriptionbodystringNoDescription"<string>"
display_orderbodyinteger · int64NoDisplay order0
modebodystringRequiredPolicy mode"allowlist"
namebodystringRequiredPolicy name"<string>"
resource_idsbodyarray | nullRequiredExpert suite scope (resource IDs)["<string>"]
resource_scopebodystringRequiredExpert suite scope"all"
statusbodystringNoEnabled"enabled"
subject_scopebodystringRequiredSubject scope"all_users"
subjectsbodyarray | nullRequiredSelect scope[{"include_descendants":false,"subject_id":"<string>","subject_type":"user"}]
surfacesbodyarray | nullRequiredTarget app["<string>"]
valid_frombodystring · date-timeNoEffective from"2026-08-27T10:00:00Z"
valid_tobodystring · date-timeNoEffective until"2026-08-27T10:00:00Z"

Request example

cURL

Responses

201 Created
NameTypeRequiredDescriptionExample
created_atstring · date-timeYesCreated at"2026-08-27T10:00:00Z"
defaultbooleanYesWhether this is the default policy groupfalse
descriptionstringYesDescription"<string>"
idstringYesPolicy group ID"<string>"
modestringYesPolicy mode"<string>"
namestringYesPolicy name"<string>"
policy_typestringYesPolicy type"<string>"
resource_countinteger · int64YesResource count0
resource_scopestringYesExpert suite scope"<string>"
statusstringYesEnabled"<string>"
subject_countinteger · int64YesSubject count0
subject_countsobjectYesSubject counts by type{}
subject_scopestringYesSubject scope"<string>"
surfacesarray | nullYesTarget app["<string>"]
updated_atstring · date-timeYesUpdated at"2026-08-27T10:00:00Z"
Response example
default Flat business error
NameTypeRequiredDescriptionExample
codestringNoStable business error code"<string>"
detailstringYesHuman-readable error description"<string>"
detailsOpenapiErrorDetailsNoError details{"field":"<string>","reason":"<string>","suggestion":"<string>"}
details.fieldstringNoRequest field that failed validation"<string>"
details.reasonstringNoStable validation failure reason"<string>"
details.suggestionstringNoSuggested normalized value"<string>"
errorstringYesStable HTTP error type"<string>"
Response example