Skip to main content
POST
Rotate your data app API key to maintain security best practices by periodically refreshing credentials. This endpoint expires the current API key and generates a new one, ensuring seamless transition while maintaining security.
The API key used in the Authorization header is the key being rotated. You only need to provide expireAt in the request body — no key field required.

Authentication

This endpoint requires the data app API key you want to rotate in the Authorization header. The key used for authentication is the key that will be expired and replaced with a new one. To access your data app API key:
  1. Go to your Databrain dashboard and open the Data Apps section.
  2. Select the data app whose API key you want to rotate.
  3. Find the API Key under the data app settings.
Use this key as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use the data app API key you want to rotate.
Content-Type
string
required
Must be set to application/json for all requests.

Request Body

expireAt
number | string
required
Duration in seconds until the current API key expires. This allows for a grace period to update your applications before the old key stops working. Accepts a number or a numeric string.

Response

key
string
The newly generated API key (UUID format). Use this key for all future API requests.
error
object
Error object returned only when the request fails. Not included in successful responses.

Examples

HTTP Status Code Summary

Possible Errors

API Token Guide

Learn about API token management and authentication

Create Data App

Create data apps and generate initial API tokens

Guest Token API

Generate guest tokens using your data app API key

List Embeds API

List all embed configurations for your data app