Skip to main content
POST
/
api-keys
Create API key
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>', expiresAt: '2023-11-07T05:31:56Z'})
};

fetch('https://api.dolfinai.co/api-keys', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rawKey": "<string>",
  "keyPrefix": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Body

application/json
name
null | string
expiresAt
null | string<date-time>

Response

Created

clientId
string<uuid>
required
rawKey
string
required
keyPrefix
string
required
id
string<uuid>
name
null | string
createdAt
string<date-time>
expiresAt
null | string<date-time>