KeysenderhomeSupport help center home
IntegrationsPricingDemoSubmit a ticketTicket statusLog inStart free
KeysenderSupport home

The Keysender help center. Setup, connected channels, orders, and delivery, for digital product vendors.

Product

  • Integrations
  • Pricing
  • Demo
  • API

Resources

  • Help Center
  • Submit a ticket
  • Ticket status
  • Request an integration
  • Connect a supplier
  • Insights
  • Refer & earn
  • Contact sales

Legal

  • Privacy Policy
  • Terms & Conditions
  • Violation Report

Bought from a seller?

Keysender is the delivery platform, not the seller. If your order has not arrived or is not as described, contact the seller directly. They can help fastest.

Get help with your order →
© 2026 Keysender. Made in the USA.
Keysender is the delivery system, not the seller.
Back
Help CenterDevelopers and APIManaging inventory databases with the API

Managing inventory databases with the API

Last updated Aug 26, 2026Developers and API

Reading this in another language? Use your browser's built-in translate option. Button and field names stay in English on purpose, to match what you see in Keysender.

Overview

A database is one pool of stock for one product, the same thing you create under Inventory in the panel. Every connected listing draws from it, and every code you upload belongs to one. The Database endpoints let your software create databases, read their stock counts, rename them, and remove empty ones, all from one bearer token.

TL;DR

  • A database is one product's stock pool, the same thing you create under Inventory in the panel.
  • Create one with POST /database; a repeat call with the same sku returns the existing one instead of a duplicate.
  • List, read, rename, and delete databases with GET/PUT/DELETE /database.
  • A database cannot be deleted while it still has codes reserved for delivery (to_send above 0).

Before you start

Make sure you have:

  • A bearer token from POST /login (see Getting started with the Keysender API).
  • The base URL https://panel.keysender.com/api/v1.0 and the header Authorization: Bearer YOUR_ACCESS_TOKEN on every call.

A database has these fields in every response: id, name, type (0 for text codes, 1 for files), available (codes in stock), to_send (codes reserved for orders that are still delivering), and sku.

Steps

List your databases

  1. Send GET /databases. Add page, pagesize, or filter=[{"name":"part of a name"}] to narrow the list.
curl "https://panel.keysender.com/api/v1.0/databases?pagesize=50" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Read one database

  1. Send GET /database?id=123. You receive the six fields above, or 422 if the id is not yours.

Create a database

  1. Send POST /database with name, sku, and type:
curl -X POST "https://panel.keysender.com/api/v1.0/database" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Steam key: Example Game", "sku": "EXAMPLE-GAME-STEAM", "type": 0}'
  1. The sku is the identifier your own systems use. If a database with that SKU already exists on your account, the API returns the existing database instead of creating a second one, so a repeated create is safe.

Rename a database

  1. Send PUT /database with id and the new name. The sku and type cannot be changed after creation; create a new database instead.

Delete a database

  1. Send DELETE /database with {"id": 123} in the body.
  2. A database that still has codes reserved for delivery (to_send above 0) cannot be deleted. Wait for those orders to finish, then retry.

Confirm it works

After POST /database, GET /databases lists the new entry with available: 0, and it appears under Inventory in the panel with the same name. After a delete, it is gone from both. Next, load it with Uploading and managing codes with the API.

Troubleshooting

Symptom Cause Action
422 with You can change only own code databases The id belongs to another account or does not exist Re-check the id with GET /databases
A create returns an id you already had The SKU was already in use; that is the match, not an error No action needed, reuse the returned id
A delete is refused The database still has codes reserved for delivery (to_send above 0) Wait for those orders to finish, then retry

If it still is not working

Submit a ticket with the request body (without your secret) and the response.

Frequently asked questions

What happens if I create a database with a SKU that already exists?

The API returns the existing database instead of creating a second one. That makes create safe to run on every sync: the SKU is the match key.

Can I change a database's SKU or type after creating it?

No. PUT /database only changes the name. Create a new database for a different SKU or type and move the stock.

Why is a delete refused?

A database with codes reserved for orders still delivering (to_send above 0) cannot be deleted. Wait for those deliveries to finish, then retry.

Related articles

Getting started with the Keysender APIConnecting your own app to KeysenderCreating transactions with the APIUploading and managing codes with the API
Back to Help Center
If this still is not workingSubmit a Ticket