Grist service accounts API
Impersonations to manage grist resources through REST APIs with specific rights.
Impersonations to manage grist resources through REST APIs with specific rights.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/grist-service-accounts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: 'An API for manipulating Grist sites, workspaces, and documents.
# Authentication
<SecurityDefinitions />
'
version: 1.0.1
title: Grist attachments service accounts API
servers:
- url: https://{gristhost}/api
variables:
subdomain:
description: The team name, or `docs` for personal areas
default: docs
security:
- ApiKey: []
tags:
- name: service accounts
description: Impersonations to manage grist resources through REST APIs with specific rights.
paths:
/service-accounts:
get:
operationId: listServiceAccounts
tags:
- service accounts
summary: Get all your service accounts
description: 'This lists all your service accounts with their details.
'
responses:
200:
description: Array of your service accounts
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountsResult'
403:
description: The caller is not allowed to access this resource
post:
operationId: createServiceAccount
tags:
- service accounts
summary: Create a service account
description: 'This creates a new service account with a new API key.
'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateServiceAccount'
responses:
200:
description: The service account created
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountResultWithApiKey'
403:
description: The caller is not allowed to create service accounts
/service-accounts/{saId}:
get:
operationId: getServiceAccount
tags:
- service accounts
summary: Get a service account's details
parameters:
- $ref: '#/components/parameters/saIdPathParam'
description: 'This reports the details of a service account.
'
responses:
200:
description: Details of the service account
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountResult'
403:
description: Access denied
404:
description: Service account not found
patch:
operationId: modifyServiceAccount
tags:
- service accounts
summary: Modify a service account
parameters:
- $ref: '#/components/parameters/saIdPathParam'
description: 'This updates a service account''s label, description or expiration date.
'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountBody'
responses:
200:
description: Success (empty body)
403:
description: The caller is not allowed to modify this service account
404:
description: Service account not found
delete:
operationId: deleteServiceAccount
tags:
- service accounts
summary: Delete a service account
parameters:
- $ref: '#/components/parameters/saIdPathParam'
description: 'This deletes a given service account.
'
responses:
200:
description: Service account deleted successfully. Returns empty body.
403:
description: The caller is not allowed to delete this service account
404:
description: Service account not found
/service-accounts/{saId}/apikey:
post:
operationId: regenerateServiceAccountApiKey
tags:
- service accounts
summary: Generate a new service account's api key
parameters:
- $ref: '#/components/parameters/saIdPathParam'
description: 'This renews an api key of a given service account.
Useful especially to change the API key when it has been leaked.
'
responses:
200:
description: The service account with the new API key
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountResultWithApiKey'
403:
description: The caller is not allowed to regenerate this api key
404:
description: Service account not found
delete:
operationId: deleteServiceAccountApiKey
tags:
- service accounts
summary: Delete a service account's api key
description: 'Deletes the API key for a service account. The service account will
no longer be able to authenticate until a new key is generated.
'
parameters:
- $ref: '#/components/parameters/saIdPathParam'
responses:
200:
description: API key deleted successfully. Returns empty body.
403:
description: The caller is not allowed to delete this api key
404:
description: Service account not found
components:
parameters:
saIdPathParam:
in: path
name: saId
schema:
type: integer
description: A service account id
schemas:
ServiceAccountsResult:
type: array
items:
$ref: '#/components/schemas/ServiceAccountResult'
CreateServiceAccount:
allOf:
- $ref: '#/components/schemas/ServiceAccountBody'
- type: object
required:
- expiresAt
ServiceAccountResult:
type: object
required:
- id
- login
- label
- description
- expiresAt
- hasValidKey
properties:
id:
type: number
example: 42
login:
type: string
example: aa52e4c7-e451-409a-8140-4eb17844e8b9@serviceaccounts.invalid
label:
type: string
example: n8n
description:
type: string
example: For data import workflow
expiresAt:
type: date
example: '2042-10-10T00:00:00.000Z'
hasValidKey:
type: boolean
example: true
ServiceAccountResultWithApiKey:
allOf:
- $ref: '#/components/schemas/ServiceAccountResult'
- type: object
required:
- apikey
properties:
key:
type: string
example: 1234567890abcdef
ServiceAccountBody:
type: object
properties:
label:
type: string
description: The service account's display name
example: n8n
description:
type: string
description: Description of service account's purpose
example: For data update workflow
expiresAt:
type: string
description: The service account's expiration date
example: '2042-10-10'
securitySchemes:
ApiKey:
type: http
scheme: bearer
bearerFormat: 'Authorization: Bearer XXXXXXXXXXX'
description: Access to the Grist API is controlled by an Authorization header, which should contain the word 'Bearer', followed by a space, followed by your API key.