---
title: "Developers: API keys and playground"
description: "Create, name, replace and revoke API keys, try the SureBright API against your store from the portal, and find the pages to send your developer."
---

Use the **Developers** page of the [Merchant Portal](/merchant-portal/overview) when your own systems need to talk to SureBright. Here you create the API key your developer needs, replace or revoke a key, and try a request against your store before any code is written.

<Warning>
Developers is **enabled on request**. When it is on, it appears under **Others** in the sidebar and as a **Developers and API** card on Settings. Contact [support@surebright.com](mailto:support@surebright.com) to have it enabled for your store.
</Warning>

| You want to | Do this |
| --- | --- |
| Give your developer access | [Create a key](#create-a-key) and pass it to them securely. |
| Replace a key that was lost or shared too widely | Click **Rotate** on the key. |
| Cut off a system that should no longer have access | Click **Revoke** on its key. |
| See a working request and response | [Try the API from the portal](#try-the-api-from-the-portal). |

## Create and manage API keys

An API key lets your own systems call the SureBright API for your store. How the key is used in a request is on [Authentication](/api-reference/authentication).

### Create a key

<Steps>
  <Step title="Name it">
    Enter a label (for example **Production server**) and click **Generate new key**. An empty label is saved as **Untitled key**.
  </Step>
  <Step title="Copy it now">
    The **Copy your new API key** dialog shows the full key once. Click **Copy** and store it securely, then **Done**.
  </Step>
</Steps>

<Danger>
This is the only time the full key is shown. The list only ever shows a masked version. If you lose a key, rotate it to get a new one.
</Danger>

Keys start with `sb_live_`. The list shows each active key's label, its masked value, when it was created and when it was last used (or **Never used**).

### Replace or revoke a key

- **Rotate** gives you a replacement key and shows it once, as above. Give the new key to whoever runs the system that uses it.
- **Revoke** opens **Revoke this API key?**. Confirm with **Revoke key**. The key stops working immediately, anything still using it starts failing, and it cannot be undone.

## Try the API from the portal

The **API playground** sends real requests to your store, so you can see a valid request and response before anyone writes code.

1. Pick an **Endpoint**:
   - **GET List categories**: the warranty categories set up on your store. No API key needed.
   - **GET Get a quote (by category)**: plan options for a category and price. Pick a **Category (from your List categories result)**. No API key needed.
   - **POST Record an order**: creates warranty contracts for an order. **This creates real data**; it appears on your Sales screen.
2. For **Record an order**, enter one of your keys in the **API key** field and edit the prefilled **Request body (JSON)**. The sample order is marked as a test order.
3. Click **Send request**. The **Response** panel shows **Success** or **Error** with the full response. A recorded order confirms **Your order went through** and offers a jump to **Sales**.

**Call it from your server** shows the same request as a curl command your developer can reuse; **Copy curl** copies it. It uses the key you entered, or the placeholder `sb_live_YOUR_API_KEY` if none.

<Note>
You do not need the API to put the widget on your storefront. That is set up for you from [Studio](/merchant-portal/studio), which is available on request. See [The storefront scan](/merchant-portal/onboarding#the-storefront-scan).
</Note>

## Where to send your developer

The page ends with links into these docs. Share them with whoever builds the integration:

- [API overview](/api-reference/introduction)
- [Authentication](/api-reference/authentication)
- [Record an order](/api-reference/endpoint/order/create-contract)
- [Get a quote](/api-reference/endpoint/quote/list-warranty-quotes-by-category)
