API keys

Introduction

You can authenticate Patchworks API requests using your dashboard credentials (OAuth 2) or API keys.

If your user account has at least manager-level permissions, you can generate and manage API keys to authenticate Patchworks API requests.

Need to know

  • You can generate as many API keys as required.

  • API keys do not expire but existing keys can be revoked or deleted.

  • An API key must be passed as an authorization value in request headers.

Generating API keys

To generate a new API key, follow the steps below.

Step 1 Log into the Patchworks dashboard, then select the general settings option:

Step 2 Select the API keys option:

Step 3 Click the create API key button:

Step 4 A new key is generated - you can now copy this for use in your API requests,

Revoking an existing API key

Revoking an existing API key will cause requests to fail wherever this key is used, but the key remains in your list for future reference. If you're sure that you want to do this, follow the steps below.

Step 1 Log into the Patchworks dashboard, then select general settings | API keys (as shown above).

Step 2 Click the ellipses associated with the key to be revoked - for example:

Step 3 Select the revoke option - for example:

The key is revoked immediately and the timestamp for this action is displayed in the list of keys - for example:

Deleting an existing API key

Deleting an existing API key will cause requests to fail wherever this key is used. Deleted keys are removed entirely, so if you need to keep track of keys issued over time, you may wish to consider the revoke option instead.

If you're sure that you want to delete an API key, follow the steps below.

Step 1 Log into the Patchworks dashboard, then select general settings | API keys (as shown above).

Step 2 Click the ellipses associated with the key to be deleted - for example:

Step 3 Select the delete option - for example:

The key is removed immediately.

Using API keys

An API key must be passed as an authorization value in request headers, for all requests.

Show me

Last updated