Skip to main content
POST
/
v2
/
workspace
/
apikeys
/
get
Get API Keys
curl --request POST \
  --url https://api.velt.dev/v2/workspace/apikeys/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": {
    "apiKeys": [
      "<string>"
    ],
    "pageSize": 123,
    "pageToken": "<string>"
  }
}
'
{
  "result": {
    "status": "success",
    "message": "API keys retrieved successfully.",
    "data": [
      {
        "id": "velt_api_key_1",
        "apiKeyName": "Production Key",
        "type": "production"
      },
      {
        "id": "velt_api_key_2",
        "apiKeyName": "Testing Key",
        "type": "testing"
      }
    ],
    "nextPageToken": "eyJsYXN0SWQiOiJ2ZWx0X2FwaV9rZXlfMiJ9"
  }
}
Use this API to retrieve a list of API keys 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/apikeys/get

Headers

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

Body

Params

data
object

Example Request

{
  "data": {
    "pageSize": 50
  }
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "API keys retrieved successfully.",
    "data": [
      {
        "id": "velt_api_key_1",
        "apiKeyName": "Production Key",
        "type": "production"
      },
      {
        "id": "velt_api_key_2",
        "apiKeyName": "Testing Key",
        "type": "testing"
      }
    ],
    "nextPageToken": "eyJsYXN0SWQiOiJ2ZWx0X2FwaV9rZXlfMiJ9"
  }
}
If there are more results, the response includes a nextPageToken string. Pass this value as pageToken in your next request to fetch the next page. When no nextPageToken is returned, you have reached the last page.

Failure Response

{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid workspace credentials."
  }
}
{
  "result": {
    "status": "success",
    "message": "API keys retrieved successfully.",
    "data": [
      {
        "id": "velt_api_key_1",
        "apiKeyName": "Production Key",
        "type": "production"
      },
      {
        "id": "velt_api_key_2",
        "apiKeyName": "Testing Key",
        "type": "testing"
      }
    ],
    "nextPageToken": "eyJsYXN0SWQiOiJ2ZWx0X2FwaV9rZXlfMiJ9"
  }
}