# Grafana Service Accounts API

**Canonical:** https://apis.io/apis/grafana-com/grafana-com-service-accounts-api/  
**Provider:** Grafana — https://apis.io/providers/grafana-com/  
**Base URL:** /api  
**Documentation:** https://grafana.com/docs/grafana/latest/developers/http_api/

Grafana Service Accounts API is one of 49 APIs that [Grafana](https://apis.io/providers/grafana-com/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Service Accounts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and authentication docs.

If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.

## Operations (8)

| Method | Path | Summary |
|---|---|---|
| POST | `/serviceaccounts` | Create service account |
| GET | `/serviceaccounts/search` | Search service accounts with paging |
| GET | `/serviceaccounts/{serviceAccountId}` | Get single serviceaccount by Id |
| DELETE | `/serviceaccounts/{serviceAccountId}` | Delete service account |
| PATCH | `/serviceaccounts/{serviceAccountId}` | Update service account |
| GET | `/serviceaccounts/{serviceAccountId}/tokens` | Get service account tokens |
| POST | `/serviceaccounts/{serviceAccountId}/tokens` | CreateNewToken adds a token to a service account |
| DELETE | `/serviceaccounts/{serviceAccountId}/tokens/{tokenId}` | DeleteToken deletes service account tokens |

## Machine-readable artifacts (32)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/grafana-com/refs/heads/main/openapi/grafana-com-service-accounts-api-openapi.yml
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/
- **Authentication** — https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_versions/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_public/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/folder/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/folder_permissions/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/data_source/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/datasource_lbac_rules/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/annotations/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/org/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/user/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/team/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/team_sync/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/preferences/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/access_control/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/sso-settings/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/admin/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/licensing/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/reporting/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/query_and_resource_caching/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/library_element/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/correlations/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/snapshot/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/short_url/
- **Documentation** — https://grafana.com/docs/grafana/latest/developers/http_api/query_history/

## Other Grafana APIs (12)

- [Grafana Cloud API](https://apis.io/apis/grafana-com/grafana-cloud-api/)
- [Grafana Loki HTTP API](https://apis.io/apis/grafana-com/loki-http-api/)
- [Grafana Mimir HTTP API](https://apis.io/apis/grafana-com/mimir-http-api/)
- [Grafana Tempo HTTP API](https://apis.io/apis/grafana-com/tempo-http-api/)
- [Grafana Pyroscope HTTP API](https://apis.io/apis/grafana-com/pyroscope-http-api/)
- [Grafana k6 Cloud API](https://apis.io/apis/grafana-com/k6-cloud-api/)
- [Grafana OnCall API](https://apis.io/apis/grafana-com/oncall-api/)
- [Grafana Synthetic Monitoring API](https://apis.io/apis/grafana-com/synthetic-monitoring-api/)
- [Grafana Access Control API](https://apis.io/apis/grafana-com/grafana-com-access-control-api/)
- [Grafana Admin API](https://apis.io/apis/grafana-com/grafana-com-admin-api/)
- [Grafana Admin Ldap API](https://apis.io/apis/grafana-com/grafana-com-admin-ldap-api/)
- [Grafana Admin Provisioning API](https://apis.io/apis/grafana-com/grafana-com-admin-provisioning-api/)

## Tags

Service Accounts

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/grafana-com/grafana-com-service-accounts-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/grafana-com/.
