Was this helpful?


Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}

API Resource Path:

/companies/{company_name}/apps/{app_ame}/keys/{consumer key}

Description: Updates an existing company app key with additional API product(s).

Verb: POST
Auth: Basic Auth
Media types:


This method updates existing app key with one or more API products.

New API products added to an app key are merged with any existing API products for the key.

Use this method to "promote" apps by adding access to additional API calls, or by adding access to an API product with higher Quota.

Note that only a single API product can be resolved per app key at runtime. API products are resolved by name, in alphabetical order. The first API product found in the list will be returned.

Sample Request:
$ curl -H "Content-type:application/json" -X POST -d \
  "apiProducts" : ["TestApiProduct1","TestApiProduct2"],
  "attributes" : [ {
    "name" : "region",
    "value" : "west"
  } ]
}' \
https://api.enterprise.apigee.com/v1/o/{org_name}/companies/{company_name}/apps/{app_name}/keys/{consumer_key} \
-u myname:mypass
Request Payload Elements:
Name Description Default Required?
apiProducts An array of API product names to be associated with this key N/A Yes
attributes Arbitrary, app-specific attributes associated with this key N/A No
Sample Response:
  "apiProducts" : [ {
    "apiproduct" : "TestApiProduct1",
    "status" : "approved"
  }, {
    "apiproduct" : "TestApiProduct2",
    "status" : "approved"
  } ],
  "attributes" : [ {
    "name" : "region",
    "value" : "west"
  } ],
  "consumerKey" : "{consumer_key}",
  "consumerSecret" : "{consumer_secret}",
  "status" : "approved"
Response Payload Elements:
Name Description
apiproduct An API product associated with this key
status The status of the key for this API product
attributes Arbitrary, app-specific attributes associated with this key
consumerKey The value of the key
consumerSecret The value of the secret associated with this key
Failure 4xx with proper error message
  "code" : "keymanagement.service.InvalidClientIdForGivenApp",
  "message" : "Invalid consumer key for Given App",
  "contexts" : [ ]


Help or comments?

  • Something's not working: See Apigee Support
  • Something's wrong with the docs: Click Send Feedback in the lower right.
    (Incorrect? Unclear? Broken link? Typo?)