In November 2020, the Apigee Edge API reference documentation will move to a new experience based on the Apigee integrated portal and visitors to this site will be redirected.

You are viewing the Apigee Edge API reference documentation. For the main product docs, and to search all docs, go to

Generate a new key pair for a developer app

Resource Summary


Content Type

application/json, text/xml


Developer App,



Generate a new key pair for a developer app

Generates a new consumer key and consumer secret for the named developer app. Rather than replacing an existing key, this API call generates a new key. For example, if you're using API key rotation, you can generate new keys whose expiration overlaps keys that will be out of rotation when they expire. You might also generate a new key/secret if the security of the original key/secret is compromised.


After using this API, multiple key pairs will be associated with a single app. Each key pair has an independent status (revoked or approved) and an independent expiry time. Any non-expired, approved key can be used in an API call.


The keyExpiresIn value is in milliseconds. A value of -1 means the key/secret pair never expire.


In this API call, you must include to following. If you don't include these, they'll be deleted.

  • Any existing custom app attributes, including Notes.
  • The callback URL.


To revoke a key/value pair that has been compromised so that it can no longer be used, see Approve or Revoke Specific Key of Developer App.

Note the following:

  • If you want to determine the consumer key and consumer secret rather than having Edge generate them randomly, see Import existing consumer keys and secrets. (However, that API does not let you set an expiration time.)
  • Apigee recommends that you use the developer's email address when calling this API. Developer IDs are generated internally by Apigee and are not guaranteed to stay the same over time. 

Resource URL /organizations/{org_name}/developers/{developer_email_or_id}/apps/{app_name}

Header Parameters

Name Values Description

application/json or text/xml.

Request Body

Name Description Default Required?
name The name of the developer app. The name becomes the unique ID of the developer app for this organization and developer. N/A Yes
apiProducts A list of API products with which the developer app is associated. The name of the API product is the name returned by a GET request to the "List API Products" endpoint. For example, if the Display Name of the API product in the Edge UI is 'Premium API Product', then the name is 'premium-api-product' (all lowercase with spaces replaced by hyphens). N/A Yes
keyExpiresIn The number of milliseconds after which the key pair expires (24 hours is 86400000 milliseconds). -1 (never expires) No

org_name Mention the organization name true

developer_email_or_id Mention the developer email or ID true

app_name Mention the app name true

HTTP Basic

OAuth 2.0



Make a request and see the response.

Make a request and see the response.

Make a request and see the response.


Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)