For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETGet API key permission options
      • GETList API keys
      • POSTCreate API key
      • GETGet aggregate API key analytics
      • GETReveal test key plaintext
      • GETGet API key
      • PUTUpdate API key
      • DELDelete API key
      • POSTRegenerate API key
      • GETGet API key analytics
Dashboard
LogoLogo
Runtype APIAPI Keys

Create API key

POST
/v1/api-keys
POST
/v1/api-keys
$curl -X POST https://api.runtype.com/v1/api-keys \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "My Application API Key"
>}'
1{
2 "apiKey": {
3 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4 "name": "My Application API Key",
5 "keyPrefix": "MAK123",
6 "searchHint": "My Application",
7 "permissions": [
8 "FLOWS:READ",
9 "RECORDS:READ"
10 ],
11 "isActive": true,
12 "expiresAt": "2024-12-31T23:59:59Z",
13 "allowedIps": [
14 "192.168.1.100",
15 "10.0.0.5"
16 ],
17 "createdAt": "2024-06-01T12:00:00Z"
18 },
19 "plainKey": "rk_4f8b7c9d2e3a1b0c",
20 "warning": "This is the only time the plaintext key will be shown. Store it securely."
21}

Create a new API key. The plaintext key is returned exactly once in the response — store it securely. API keys cannot be created using another API key (use the dashboard).

Was this page helpful?
Previous

Get aggregate API key analytics

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Request

This endpoint expects an object.
namestringRequired1-255 characters
permissionslist of stringsOptionalDefaults to ["FLOWS:READ","RECORDS:READ"]
expiresAtdatetimeOptional
allowedIpslist of stringsOptionalDefaults to []
environmentenumOptionalDefaults to test
Allowed values:

Response

Created API key
apiKeyobject
plainKeystring
warningstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error