Ask Sage Dataset Management API
Dataset operations and permissions
Dataset operations and permissions
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/ask-sage:ask-sage-dataset-management-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:
title: Ask Sage User API — Full Response Reference Dataset…
description: 'Ask Sage User API for account management, organization administration, billing, and platform configuration.
## Base URL
`https://api.asksage.ai/user`
## Authentication
Most endpoints require a valid JWT token sent in the `x-access-tokens` HTTP header. Secured endpoints show a padlock in Swagger UI / Redoc — click **Authorize** and paste your token once to apply it to every request.
Get a token from `/get-token-with-api-key` (your email + 64-character API key), then send it on each call:
`x-access-tokens: `
**No token required:** `/get-token-with-api-key`, `/register`, `/verify-email`, `/lost-pass`, and `GET /get-headers`.
Beyond a valid token, admin (`admin-*`) and superadmin (`superadmin-*`) endpoints require the caller to hold the matching role, and many identify the target user via an `email` field in the request body.
## Key Features
- **User Management** — Profile updates, API key management, login history
- **Chat Sessions** — Create, retrieve, and manage conversation history
- **Dataset Management** — Create datasets, manage permissions and assignments
- **Workbooks** — Organize research with sources and memos
- **Organization Admin** — User management, token allocation, usage reporting
- **Superadmin** — Platform-wide administration and analytics'
version: '2.0'
contact:
name: Support
email: support@asksage.ai
url: https://asksage.ai
servers:
- url: '{baseUrl}/user'
description: Ask Sage User API
variables:
baseUrl:
default: https://api.asksage.ai
description: API base URL. Use https://api.asksage.ai for production, or your self-hosted instance URL.
security:
- ApiKeyAuth: []
tags:
- name: Dataset Management
description: Dataset operations and permissions
paths:
/add-dataset:
post:
summary: Add dataset to user
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
minLength: 4
maxLength: 100
description: Name of the dataset to create; must be 4-99 characters, cannot be 'none' or 'undefined', and a 'workbook-<id>' prefix binds the dataset to one of your existing workbooks.
classification:
type: string
enum:
- Unclassified
- CUI
description: Security classification applied to the dataset's contents; an invalid value falls back to the default, and a name containing 'cui' is automatically forced to CUI.
default: Unclassified
is_tabular:
type: boolean
default: false
description: Whether this is a tabular dataset
responses:
'200':
description: Dataset add result envelope. response is a status message string ('OK' on success), status is the app-level code.
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: '''OK'' on success, otherwise an error message'
status:
type: integer
description: 'App-level status: 200 success; 400/405/406/407/408/409 error variants'
example: 200
operationId: postAddDataset
x-operation-id-source: derived
/assign-dataset:
post:
summary: Assign dataset to user
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
- email
properties:
dataset:
type: string
description: Name of the dataset to share with the target user.
email:
type: string
format: email
example: user@example.com
description: Email address of the user to grant dataset access to.
permissions:
type: string
description: Access level to grant on the dataset; 'write' is accepted as an alias for 'edit' and any unrecognized value is coerced to 'read'.
enum:
- read
- edit
- admin
default: read
responses:
'200':
description: Dataset assignment result envelope.
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: '''OK'' on success, otherwise an error message'
status:
type: integer
example: 200
operationId: postAssignDataset
x-operation-id-source: derived
/deassign-dataset:
post:
summary: Remove dataset from user
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
- email
properties:
dataset:
type: string
description: Name of the dataset whose access grant should be removed from the specified user.
email:
type: string
format: email
example: user@example.com
description: Email address of the user whose access to the dataset is being revoked.
responses:
'200':
description: Dataset de-assignment result envelope.
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: '''OK'' on success, otherwise an error message'
status:
type: integer
example: 200
operationId: postDeassignDataset
x-operation-id-source: derived
/update-permission-dataset:
post:
summary: Update dataset permissions
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
- email
properties:
dataset:
type: string
description: Name of the dataset whose permission grant for the specified user should be updated.
email:
type: string
format: email
example: user@example.com
description: Email address of the user whose permission level on the dataset is being changed.
permissions:
type: string
enum:
- read
- edit
- admin
default: read
description: Access level to grant the user; 'write' is treated as an alias for 'edit', and any unrecognized value falls back to 'read'.
responses:
'200':
description: Permission update result envelope.
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: '''OK'' on success, otherwise an error message'
status:
type: integer
example: 200
operationId: postUpdatePermissionDataset
x-operation-id-source: derived
/get-datasets-with-permissions:
post:
summary: Get user datasets with permissions
tags:
- Dataset Management
requestBody:
content:
application/json:
schema:
type: object
properties:
check_permissions:
type: boolean
default: true
description: When true, filters the returned datasets to those the user is authorized to access (by classification); when false, returns all of the user's datasets unfiltered.
responses:
'200':
description: List of user datasets with permission info.
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
properties:
dataset:
type: string
classification:
type: string
permissions:
type: string
description: read | edit | admin | owner
is_tabular:
type: boolean
status:
type: integer
example: 200
operationId: postGetDatasetsWithPermissions
x-operation-id-source: derived
get:
summary: Get user datasets with permissions (GET)
tags:
- Dataset Management
responses:
'200':
description: List of user datasets with permission info.
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
properties:
dataset:
type: string
classification:
type: string
permissions:
type: string
description: read | edit | admin | owner
is_tabular:
type: boolean
status:
type: integer
example: 200
operationId: getGetDatasetsWithPermissions
x-operation-id-source: derived
/delete-dataset:
post:
summary: Delete dataset
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
description: Name of the dataset to permanently delete.
responses:
'200':
description: Dataset deletion result envelope.
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: '''OK'' on success, otherwise an error message'
status:
type: integer
example: 200
operationId: postDeleteDataset
x-operation-id-source: derived
/get-dataset-permissions:
post:
summary: Check dataset permissions
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
description: Name of the dataset to check your access against.
permissions:
type: string
enum:
- read
- edit
- admin
- owner
default: read
description: Permission level to test; the endpoint returns whether the calling user holds this access on the dataset. 'write' is treated as 'edit', and unrecognized values fall back to 'read'.
responses:
'200':
description: Boolean permission check envelope.
content:
application/json:
schema:
type: object
properties:
response:
type: boolean
description: true if the user holds the requested permission level
status:
type: integer
example: 200
operationId: postGetDatasetPermissions
x-operation-id-source: derived
/get-dataset-assignments:
post:
summary: Get dataset assignments
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
description: Name of the dataset whose per-user access assignments to list.
responses:
'200':
description: List of users assigned to the dataset with their permission levels.
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
properties:
id:
type: integer
example: 123
email:
type: string
example: user@example.com
permissions:
type: string
description: read | edit | admin | owner
status:
type: integer
example: 200
operationId: postGetDatasetAssignments
x-operation-id-source: derived
/update-dataset-organization:
post:
summary: Update dataset organization sharing
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
description: Name of the dataset whose organization-wide sharing setting to update.
enable:
type: boolean
description: Enable or disable organization-wide access
responses:
'200':
description: Organization-sharing update envelope; response is boolean true on success.
content:
application/json:
schema:
type: object
properties:
response:
type: boolean
description: true on success; error string on 400 body
status:
type: integer
example: 200
operationId: postUpdateDatasetOrganization
x-operation-id-source: derived
/get-dataset-organization:
post:
summary: Get dataset organization status
tags:
- Dataset Management
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- dataset
properties:
dataset:
type: string
description: Name of the dataset whose organization-wide sharing status to retrieve (returns 1 if shared across the organization, 0 otherwise).
responses:
'200':
description: Org-sharing status envelope; response is 1 (shared) or 0 (not shared).
content:
application/json:
schema:
type: object
properties:
response:
type: integer
description: 1 if org assignment exists, 0 otherwise (or error string on 400 body)
status:
type: integer
example: 200
operationId: postGetDatasetOrganization
x-operation-id-source: derived
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-access-tokens
description: JWT authentication token. Obtain a token by calling `/get-token-with-api-key` with your email and 64-character API key. Some admin and superadmin endpoints also require an email address in the request body to identify the target user.
x-provenance:
method: harvested
publisher: Ask Sage
source: https://docs.asksage.ai/api-docs/specs/user-api-spec.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)