Skip to main content
POST
/
v2
/
workspace
/
get
Get Workspace
curl --request POST \
  --url https://api.velt.dev/v2/workspace/get \
  --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": {}
}'
{
  "result": {
    "status": "success",
    "message": "Workspace retrieved 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 retrieve details of an existing Velt 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/get

Headers

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

Body

Params

data
object
required
Empty data object.

Example Request

{
  "data": {}
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Workspace retrieved 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 workspace not found
{
  "error": {
    "status": "NOT_FOUND",
    "message": "Workspace not found."
  }
}
{
  "result": {
    "status": "success",
    "message": "Workspace retrieved 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"
        }
      }
    }
  }
}