# Admin API

The Admin API allows your server to manage users via a GraphQL endpoint. You can list users, search users, view user details, and many more. In fact, the user management part of the portal is built with the Admin API.

## The Admin API GraphQL endpoint

The Admin API GraphQL endpoint is at `/_api/admin/graphql`. For example, if your app is `myapp` , then the endpoint is `https://myapp.authgear.cloud/_api/admin/graphql` .

## Authentication of the API endpoint

Accessing the Admin API GraphQL endpoint requires your server to generate a valid JWT and include it as `Authorization` HTTP header.

See [authentication-and-security](https://docs.authgear.com/reference/apis/admin-api/authentication-and-security "mention") to learn how to access the Admin API securely.

## API Explorer

If you want to explore what the Admin API can do, you can visit the GraphiQL tool. The GraphQL schema can also be found there.

* Go to **Advanced** -> **Admin API**
* Click on the **GraphiQL tool** link
* Toggle the **schema** documentation by pressing the Docs button in the top left corner.

<figure><img src="https://2638622528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAjXpMovvVxeIY33s_K%2Fuploads%2Fgit-blob-e8e114b219eaba0fd23fa442b18d31a9ae494e99%2FGraphiQL%20Explorer.png?alt=media" alt=""><figcaption><p>Explor the Admin API with GraphiQL tool from the Admin Portal</p></figcaption></figure>

{% hint style="danger" %}
The GraphiQL tool is NOT a sandbox environment and all changes will be made on **real, live, production data**. Use with care!
{% endhint %}

## API Schema

{% content-ref url="admin-api/api-schema" %}
[api-schema](https://docs.authgear.com/reference/apis/admin-api/api-schema)
{% endcontent-ref %}

## API Examples

{% content-ref url="admin-api/api-queries-and-mutations" %}
[api-queries-and-mutations](https://docs.authgear.com/reference/apis/admin-api/api-queries-and-mutations)
{% endcontent-ref %}


---

# 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.authgear.com/reference/apis/admin-api.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.
