API ReferenceEnvironments
Update an environment
PATCH
/v1/apps/{appId}/environments/{envId}Authorization
ApiKeyAuth AuthorizationBearer <token>
API key authentication. Keys are prefixed with environment:
npk_live_for productionnpk_test_for testing/staging
In: header
Path Parameters
appId*string
Application ID
envId*string
Environment ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
displayName?string
Response Body
application/json
application/json
application/json
curl -X PATCH "https://api.npayload.com/v1/apps/string/environments/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"name": "string",
"displayName": "string",
"isProduction": true,
"createdAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Was this page helpful?