Create API Key
Generate a new API key for authenticating requests to the Trillet API.
POST
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
Request Body
metadataobjectOptional metadata to associate with the API key.
Response Fields
keystringThe generated 32-character API key. Store this securely as it cannot be retrieved again.
_idstringUnique identifier for the API key record.
userIdstringUser ID associated with the API key.
metadataobjectMetadata associated with the API key.
createdAtstringTimestamp when the API key was created.
{
"key": "tk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"_id": "665a1b2c3d4e5f6a7b8c9d0e",
"userId": "664a1b2c3d4e5f6a7b8c9d0e",
"metadata": {},
"createdAt": "2024-06-01T09:00:00.000Z"
}