Create API Key
curl --request POST \
--url https://api.velt.dev/v2/workspace/apikey/create \
--header 'Content-Type: application/json' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--header 'x-velt-workspace-id: <x-velt-workspace-id>' \
--data '
{
"data": {
"ownerEmail": "<string>",
"type": "<string>",
"createAuthToken": true,
"apiKeyName": "<string>",
"planInfo": {
"type": "<string>"
},
"customPlanInfo": true,
"customPlanInfoData": {},
"allowedDomains": [
"<string>"
],
"addLocalHostToAllowedDomains": true,
"useEmailService": true,
"useWebhookService": true,
"emailServiceConfig": {
"type": "<string>",
"apiKey": "<string>",
"fromEmail": "<string>",
"fromCompany": "<string>",
"commentTemplateId": "<string>",
"tagTemplateId": "<string>"
},
"webhookServiceConfig": {
"authToken": "<string>",
"rawNotificationUrl": "<string>",
"processedNotificationUrl": "<string>"
}
}
}
'{
"result": {
"status": "success",
"message": "API key created successfully.",
"data": {
"apiKey": "your_new_api_key"
}
}
}
API Key Management
Create API Key
POST
/
v2
/
workspace
/
apikey
/
create
Create API Key
curl --request POST \
--url https://api.velt.dev/v2/workspace/apikey/create \
--header 'Content-Type: application/json' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--header 'x-velt-workspace-id: <x-velt-workspace-id>' \
--data '
{
"data": {
"ownerEmail": "<string>",
"type": "<string>",
"createAuthToken": true,
"apiKeyName": "<string>",
"planInfo": {
"type": "<string>"
},
"customPlanInfo": true,
"customPlanInfoData": {},
"allowedDomains": [
"<string>"
],
"addLocalHostToAllowedDomains": true,
"useEmailService": true,
"useWebhookService": true,
"emailServiceConfig": {
"type": "<string>",
"apiKey": "<string>",
"fromEmail": "<string>",
"fromCompany": "<string>",
"commentTemplateId": "<string>",
"tagTemplateId": "<string>"
},
"webhookServiceConfig": {
"authToken": "<string>",
"rawNotificationUrl": "<string>",
"processedNotificationUrl": "<string>"
}
}
}
'{
"result": {
"status": "success",
"message": "API key created successfully.",
"data": {
"apiKey": "your_new_api_key"
}
}
}
Use this API to create a new API key for a workspace.Documentation Index
Fetch the complete documentation index at: https://velt-v5-0-2-beta-28.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint uses workspace-level auth: pass
x-velt-workspace-id and x-velt-auth-token (from the Create Workspace response) as headers.Endpoint
POST https://api.velt.dev/v2/workspace/apikey/create
Headers
Your Workspace ID.
Your Auth Token.
Body
Params
Show properties
Show properties
Email address of the API key owner.
API key type. Accepted values:
"testing" or "production". Production keys require planInfo or customPlanInfo.Whether to create an auth token along with the API key. Recommended:
true.Display name for the API key.
Plan information object associated with this API key. Required for
"production" type unless customPlanInfo is true.Show properties
Show properties
Plan type identifier (e.g.,
"sdk test", "production").Whether to use custom plan info instead of standard
planInfo.Freeform custom plan info data payload. Required when
customPlanInfo is true. You can pass any key-value pairs needed for your custom plan configuration.List of domains allowed to use this API key.
Whether to automatically add localhost to allowed domains.
Whether to enable the email service for this API key.
Whether to enable the webhook service for this API key.
Configuration object for the email service. See Update Email Config for the full schema.
Show properties
Show properties
Email service provider type. Accepted values:
"default" or "sendgrid".API key for the email service provider (e.g., your SendGrid API key).
Sender email address.
Sender company name.
SendGrid template ID for comment notification emails.
SendGrid template ID for tag/mention notification emails.
Configuration object for the webhook service. See Update Webhook Config for the full schema.
Example Request
{
"data": {
"ownerEmail": "owner@example.com",
"type": "testing",
"createAuthToken": true
}
}
Example Response
Success Response
{
"result": {
"status": "success",
"message": "API key created successfully.",
"data": {
"apiKey": "your_new_api_key"
}
}
}
Failure Response
{
"error": {
"status": "INVALID_ARGUMENT",
"message": "ownerEmail is required."
}
}
{
"result": {
"status": "success",
"message": "API key created successfully.",
"data": {
"apiKey": "your_new_api_key"
}
}
}
Was this page helpful?
⌘I

