For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
      • PUTCreate or update context kind
      • DELDelete context instances
      • POSTEvaluate flags for context instance
      • GETGet context attribute names
      • GETGet context attribute values
      • GETGet context instances
      • GETGet context kinds
      • GETGet contexts
      • POSTSearch for context instances
      • POSTSearch for contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewContexts

Create or update context kind

PUT
/api/v2/projects/:projectKey/context-kinds/:key
PUT
/api/v2/projects/:projectKey/context-kinds/:key
$curl -X PUT https://app.launchdarkly.com/api/v2/projects/projectKey/context-kinds/key \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "organization"
>}'
1{
2 "status": "success",
3 "_links": {}
4}
Create or update a context kind by key. Only the included fields will be updated.
Was this page helpful?
Previous

Delete context instances

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
keystringRequiredformat: "string"
The context kind key

Request

This endpoint expects an object.
namestringRequired
The context kind name
descriptionstringOptional
The context kind description
hideInTargetingbooleanOptional
Alias for archived.
archivedbooleanOptional
Whether the context kind is archived. Archived context kinds are unavailable for targeting.
versionintegerOptional
The context kind version. If not specified when the context kind is created, defaults to 1.

Response

Context kind upsert response
statusstring
The status of the create or update operation
_linksmap from strings to objects
The location and content type of related resources

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error