> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Auth Tokens

Use this API to retrieve all auth tokens associated with a specific API key.

<Info>
  This endpoint uses **workspace-level auth**: pass `x-velt-workspace-id` and `x-velt-auth-token` (from the Create Workspace response) as headers.
</Info>

# Endpoint

`POST https://api.velt.dev/v2/workspace/authtokens/get`

# Headers

<ParamField header="x-velt-workspace-id" type="string" required>
  Your Workspace ID.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="apiKey" type="string" required>
      The API key whose auth tokens should be retrieved.
    </ParamField>
  </Expandable>
</ParamField>

# Example Request

```JSON theme={null}
{
  "data": {
    "apiKey": "velt_api_key_1"
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Auth tokens retrieved successfully.",
    "data": {
      "apiKey": "velt_api_key_1",
      "authTokens": [
        {
          "token": "eyJhbGciOiJSUzI1NiIs...",
          "name": "Default Auth Token",
          "domains": []
        }
      ]
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "NOT_FOUND",
    "message": "API key not found."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Auth tokens retrieved successfully.",
      "data": {
        "apiKey": "velt_api_key_1",
        "authTokens": [
          {
            "token": "eyJhbGciOiJSUzI1NiIs...",
            "name": "Default Auth Token",
            "domains": []
          }
        ]
      }
    }
  }
  ```
</ResponseExample>
