> For the complete documentation index, see [llms.txt](https://developer.abacum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.abacum.ai/api-reference/variables/list-variables.md).

# List variables

Retrieve a list of variables for the authenticated user's organization. Optionally filter by model.

```json
{"openapi":"3.0.0","info":{"title":"Abacum public API","version":"1.0.0"},"tags":[{"name":"Variables","description":"List the variables of your models."}],"servers":[{"url":"https://api.abacum.io","description":"Prod environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An access token from the token endpoint, sent as `Authorization: Bearer <access_token>`. Use it to try an endpoint from this page. The token carries the permissions of its user, so use a user with the lowest role that fits the call."}},"schemas":{"ErrorMessage":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"DetailMessage":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"TooManyRequests20PerMinute":{"description":"Rate limit exceeded: 20 requests per minute for the same user and URL. Wait the number of seconds in the `Retry-After` header, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}},"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"InternalServerError":{"description":"An unexpected error on our side. The response has an empty body. Repeat the request, and contact support if it keeps failing.","headers":{"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}}}},"headers":{"XRequestID":{"description":"Identifier of this request. Quote it when you contact support so they can find the exact request. A server-side client can set it by sending an `X-Request-ID` request header of 1 to 64 characters from `A-Za-z0-9_-`; any other value is replaced by a generated one. Browsers can read this header but cannot send their own. The value identifies a request for support, but it is not proof that only one request used it.","schema":{"type":"string"}}}},"paths":{"/public-api/variables":{"get":{"summary":"List variables","description":"Retrieve a list of variables for the authenticated user's organization. Optionally filter by model.","operationId":"listVariables","tags":["Variables"],"parameters":[{"in":"query","name":"model_id","schema":{"type":"string","format":"uuid"},"required":false,"description":"Filter variables by model ID. Without it, the response lists the variables of every model the user can read."}],"responses":{"200":{"description":"A list of variables.","content":{"application/json":{"schema":{"type":"object","required":["data","metadata"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","description","model_name","model_id","is_ai_priority","dimensions"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the variable. Use it in `variable_ids` of the model data endpoints."},"name":{"type":"string","description":"Name of the variable."},"description":{"type":"string","description":"Free-text description of the variable."},"model_name":{"type":"string","description":"Name of the model the variable belongs to."},"model_id":{"type":"string","format":"uuid","description":"Unique identifier of the model the variable belongs to."},"is_ai_priority":{"type":"boolean","description":"Whether the variable is marked as an AI priority."},"dimensions":{"type":"array","items":{"type":"string"},"description":"Names of the dimensions the variable can be broken down by. Use them as the dimensions of a table breakdown. A hierarchy level has the suffix `_level_<n>` (for example `Account_level_2`). The list is empty when the variable has no dimensions."}}}},"metadata":{"type":"object","description":"Always an empty object."}}}}}},"400":{"description":"Invalid request - `model_id` is not a valid UUID. The body is `{\"error\": \"<message>\"}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"One of three causes:\n\n- The bearer token is missing, invalid or expired. The response has an empty body.\n- The token's user is not an Admin or Super Admin. The body is `{\"detail\": \"You do not have permission to perform this action.\"}`.\n- The model in `model_id` is restricted and the user cannot access it. The response has an empty body.\n\nThe API answers `403` for a bad token, not `401`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"404":{"description":"Model not found - the specified model_id does not exist or does not belong to the user's organization. The response has an empty body."},"429":{"$ref":"#/components/responses/TooManyRequests20PerMinute"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
