cURL
curl --request POST \ --url https://api.tensormesh.ai/v1/users/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "userId": "<string>", "name": "<string>", "scopes": [ "<string>" ], "expiresAt": "2023-11-07T05:31:56Z" } '
{ "apiKey": { "id": "<string>", "name": "<string>", "scopes": [ "<string>" ], "createdAt": "2023-11-07T05:31:56Z", "expiresAt": "2023-11-07T05:31:56Z", "deletedAt": "2023-11-07T05:31:56Z" } }
Creates an API key for a user.
Bearer authentication using an access token. Format: Bearer <access_token>
CreateUserApiKeyRequest is the request to create a user API key.
The user ID that owns this key.
Optional key name.
Optional scopes.
Optional expiration.
A successful response.
CreateUserApiKeyResponse is the response after creating an API key.
ApiKey represents an API key object owned by a user.
Show child attributes