Skip to main content
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.
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

x-velt-workspace-id
string
required
Your Workspace ID.
x-velt-auth-token
string
required

Body

Params

data
object
required

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"
    }
  }
}