Skip to main content
POST
/
v2
/
workspace
/
create
Create Workspace
curl --request POST \
  --url https://api.velt.dev/v2/workspace/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "ownerEmail": "<string>",
    "name": "<string>",
    "workspaceName": "<string>",
    "avatar": "<string>"
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Workspace created successfully.",
    "data": {
      "id": "workspace_abc123",
      "name": "My Workspace",
      "owner": {
        "email": "owner@example.com",
        "id": "owner_id_123",
        "name": "John Doe",
        "avatar": ""
      },
      "authToken": "eyJhbGciOiJSUzI1NiIs...",
      "apiKeyList": {
        "velt_api_key_1": {
          "apiKeyName": "John Doe Test API Key",
          "id": "velt_api_key_1",
          "type": "testing"
        }
      }
    }
  }
}
Use this API to programmatically create a new Velt workspace. Protected by IP-based rate limiting and disposable email domain blocking.
This is a public endpoint — no authentication headers are required.

Endpoint

POST https://api.velt.dev/v2/workspace/create

Body

Params

data
object
required

Example Request

{
  "data": {
    "ownerEmail": "owner@example.com",
    "name": "John Doe",
    "workspaceName": "My Workspace",
    "avatar": "https://example.com/avatar.png"
  }
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Workspace created successfully.",
    "data": {
      "id": "workspace_abc123",
      "name": "My Workspace",
      "owner": {
        "email": "owner@example.com",
        "id": "owner_id_123",
        "name": "John Doe",
        "avatar": ""
      },
      "authToken": "eyJhbGciOiJSUzI1NiIs...",
      "apiKeyList": {
        "velt_api_key_1": {
          "apiKeyName": "John Doe Test API Key",
          "id": "velt_api_key_1",
          "type": "testing"
        }
      }
    }
  }
}
apiKeyList is a keyed object (not an array). Each key is the API key ID. To extract the first API key, use Object.keys(result.data.apiKeyList)[0] in JavaScript or iterate over the object keys.

Failure Response

If email domain is disposable
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Disposable email domains are not allowed."
  }
}
If rate limit exceeded
{
  "error": {
    "status": "RESOURCE_EXHAUSTED",
    "message": "Too many requests. Please try again later."
  }
}

Next Steps

After creating a workspace, use the response values for subsequent API calls:
  • Workspace-level endpoints (e.g., Get Workspace, Create API Key): pass result.data.id as the x-velt-workspace-id header and result.data.authToken as the x-velt-auth-token header.
  • API-key-level endpoints (e.g., Add Domains, Update Email Config): extract the API key ID from Object.keys(result.data.apiKeyList)[0], then retrieve its auth token via Get Auth Tokens. Pass these as x-velt-api-key and x-velt-auth-token.
{
  "result": {
    "status": "success",
    "message": "Workspace created successfully.",
    "data": {
      "id": "workspace_abc123",
      "name": "My Workspace",
      "owner": {
        "email": "owner@example.com",
        "id": "owner_id_123",
        "name": "John Doe",
        "avatar": ""
      },
      "authToken": "eyJhbGciOiJSUzI1NiIs...",
      "apiKeyList": {
        "velt_api_key_1": {
          "apiKeyName": "John Doe Test API Key",
          "id": "velt_api_key_1",
          "type": "testing"
        }
      }
    }
  }
}