# List company

{% hint style="info" %}
[api-docs](https://api.greenearth.ai/api/api-docs) Redoc document (api spec)
{% endhint %}

{% openapi src="/files/Lii1IpL0WvkEW9nWVbfo" path="/api/company/list" method="get" %}
[openApi.json](https://1469186640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCU6kpEkHIZtR3Dw04saq%2Fuploads%2FuTfaJv07UDHnavZwOPFM%2FopenApi.json?alt=media\&token=20a01eda-5c56-4e35-a420-22c858ed9741)
{% endopenapi %}

This API endpoint "GET /api/company/list" allows you to retrieve a list of companies. To access this endpoint, you will need an API key with either "partner" or "admin" level of authorization.

You can pass optional parameters of "company\_id" and "company\_name" in the query string to retrieve specific company information.

The response of this API endpoint returns a JSON object containing either an error message or the data of the companies requested. The data includes an array of company objects with properties such as "company\_constants", "\_id", "company\_name", "createdAt", "updatedAt". The metadata object within the data object provides information about the page number, total number of items, and page size.

A successful response will have a HTTP status code of 200.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.greenearth.ai/api-endpoints/list-company.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
