POST
/
key
/
create
curl --request POST \
  --url http://api.integralapi.co/public/key/create \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'Integral-Application-Id: <integral-application-id>' \
  --data '{
  "userId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "isSandbox": true,
  "expiresAt": {},
  "metadata": {}
}'
{
  "apiKey": {
    "id": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "deletedAt": "<string>",
    "apiKey": "<string>",
    "isPaused": true,
    "isRevoked": true,
    "name": "<string>",
    "description": "<string>",
    "expiresAt": "<string>",
    "lastUsed": "<string>"
  }
}

Request

Authorization
string
required

An API key is a token that you provide when making API calls.

Integral-Application-Id
string
required

An Application ID that finds the application you are working with. This Application ID can be found on the Integral platform through the dashboard or Application’s page.

Body Parameters

userId
string
required

This is a unique index on your database to find users. This will allow us to know which API key associates to each user on your application’s end.

name
string
required

This is the name applied to allow it to be indexed.

description
string

This is the description applied to an API key to identify it for a human. Use this to describe who the key belongs to, or why this key is relevant/exists.

isSandbox
boolean

This value is a boolean to determine whether the key is for Sandbox use only or not. If it is for sandbox use, it will not be able to access real data and will only be able to work with templated data.

expiresAt
enum

When the old key (passed in key) will expire and become revoked (only previous requests and logs are visible). Options are: - 1h: in 1 hour - 24h: in 24 hours - 3d: in 3 days - 7d: in 7 days - 2w: 2 weeks

metadata
object

Attach metadata to help with indexing on a user, or for easily pulling data off of on the request.

Response

Response Fields

apiKey
object
required