Download OpenAPI specification:
API for search.buildscale.ai, a specialized semantic search engine.
Manages users, repositories, versioned documents composed of deduplicated chunks,
tags, and provides semantic search capabilities with secure access to content via presigned URLs.
Includes endpoints for user authentication and authorization using JWT.
Creates a new user account. Requires unique username and email. Passwords are hashed securely.
User registration details
| username required | string [ 3 .. 50 ] characters ^[a-zA-Z0-9_]+$ Unique username for the account. |
| email required | string <email> Unique email address for the account. |
| password required | string <password> >= 8 characters User's password (will be hashed). Minimum length 8, requires uppercase, lowercase, number, symbol recommended. |
{- "username": "new_user",
- "email": "new_user@example.com",
- "password": "StrongP@ssword123"
}{- "user_id": "uuid-user-12345",
- "username": "new_user",
- "email": "new_user@example.com",
- "created_at": "2025-05-01T09:38:00Z"
}Authenticates a user with email and password, returning JWT access and refresh tokens upon success.
User login credentials
| email required | string <email> User's registered email address. |
| password required | string <password> User's password. |
{- "email": "new_user@example.com",
- "password": "StrongP@ssword123"
}{- "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi...",
- "user": {
- "user_id": "uuid-user-12345",
- "username": "new_user"
}
}Uses a valid refresh token to obtain a new access token (and potentially a new refresh token).
Refresh token to be validated
| refresh_token required | string The refresh token obtained during login. |
{- "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi..."
}{- "access_token": "new-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refresh_token": "possibly-new-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi..."
}Creates a new repository owned by the authenticated user. Requires Bearer token.
Repository details
| name required | string Name for the new repository (unique per user). |
| description | string or null Optional description for the repository. |
| is_public | boolean Default: false Whether the repository should be publicly accessible. |
| tags | Array of strings Optional initial list of repository tags. |
{- "name": "my-research-project",
- "description": "Repository for AI research papers.",
- "is_public": false,
- "tags": [
- "ai",
- "research"
]
}{- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "owner_username": "string",
- "repository_name": "string",
- "description": "string",
- "is_public": true,
- "created_at": "2019-08-24T14:15:22Z",
- "tags": [
- "string"
]
}Lists repositories accessible to the authenticated user (owned or shared), with pagination. Requires Bearer token.
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
{- "items": [
- {
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "owner_username": "string",
- "repository_name": "string",
- "description": "string",
- "is_public": true,
- "created_at": "2019-08-24T14:15:22Z",
- "tags": [
- "string"
]
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Retrieves details for a specific repository if the user has access. Requires Bearer token for private repos. Public repos might not require auth depending on implementation.
| repository_id required | string <uuid> The UUID identifier of the repository. |
{- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "owner_username": "string",
- "repository_name": "string",
- "description": "string",
- "is_public": true,
- "created_at": "2019-08-24T14:15:22Z",
- "tags": [
- "string"
]
}Updates mutable details of a repository (like description, public status). Requires ownership or specific permissions via Bearer token.
| repository_id required | string <uuid> The UUID identifier of the repository. |
Fields to update
| description | string or null New description for the repository. |
| is_public | boolean New visibility setting for the repository. |
{- "description": "Updated description.",
- "is_public": true
}{- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "owner_username": "string",
- "repository_name": "string",
- "description": "string",
- "is_public": true,
- "created_at": "2019-08-24T14:15:22Z",
- "tags": [
- "string"
]
}Deletes a repository and all its associated documents and versions. Requires ownership via Bearer token. This operation is irreversible.
| repository_id required | string <uuid> The UUID identifier of the repository. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Retrieves a paginated list of logical documents within a specific repository. Requires read access via Bearer token.
| repository_id required | string <uuid> The UUID identifier of the repository. |
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
{- "items": [
- {
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
- "created_at": "2019-08-24T14:15:22Z"
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Creates a new logical document and its initial version based on provided content. Requires write access via Bearer token.
| repository_id required | string <uuid> The UUID identifier of the repository. |
Initial document content and metadata
| title | string Initial title for the first version. |
| doc_tags | Array of strings Optional initial document tags for the first version. |
| content_url | string <uri> URL of the content to ingest (use instead of file). |
| content_file | string <binary> File containing the content to ingest (use instead of URL). |
{- "document": {
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
- "created_at": "2019-08-24T14:15:22Z"
}, - "initial_version": {
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}
}Retrieves the list of tags associated with a specific repository. Requires read access.
| repository_id required | string <uuid> The UUID identifier of the repository. |
{- "tags": [
- "ai",
- "rust",
- "performance"
]
}Adds a tag to a specific repository. Requires write access. Idempotent (adding existing tag succeeds).
| repository_id required | string <uuid> The UUID identifier of the repository. |
| tag_name required | string |
{- "tag_name": "new-tag"
}{- "tags": [
- "string"
]
}Removes a specific tag from a repository. Requires write access. Idempotent.
| repository_id required | string <uuid> The UUID identifier of the repository. |
| tag_name required | string The name of the repository tag. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Retrieves a paginated list of logical documents within a specific repository. Requires read access via Bearer token.
| repository_id required | string <uuid> The UUID identifier of the repository. |
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
{- "items": [
- {
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
- "created_at": "2019-08-24T14:15:22Z"
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Creates a new logical document and its initial version based on provided content. Requires write access via Bearer token.
| repository_id required | string <uuid> The UUID identifier of the repository. |
Initial document content and metadata
| title | string Initial title for the first version. |
| doc_tags | Array of strings Optional initial document tags for the first version. |
| content_url | string <uri> URL of the content to ingest (use instead of file). |
| content_file | string <binary> File containing the content to ingest (use instead of URL). |
{- "document": {
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
- "created_at": "2019-08-24T14:15:22Z"
}, - "initial_version": {
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}
}Retrieves information about the logical document entity, including its current version ID. Requires read access via repository.
| document_id required | string <uuid> The UUID identifier of the logical document. |
{- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "repository_id": "b349ae61-b973-4c6c-a5e0-89183ba99ff3",
- "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
- "created_at": "2019-08-24T14:15:22Z",
- "current_version": {
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}
}Deletes the logical document and all its associated versions and data. Irreversible. Requires ownership or specific permissions.
| document_id required | string <uuid> The UUID identifier of the logical document. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Retrieves a paginated list of versions for a specific logical document, usually ordered newest first. Requires read access.
| document_id required | string <uuid> The UUID identifier of the logical document. |
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
{- "items": [
- {
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Submits new content for a document, which triggers the creation of a new document version. Requires write access.
| document_id required | string <uuid> The UUID identifier of the logical document. |
New content and optional version metadata
| title | string Optional title for the new version. If omitted, might inherit or be blank. |
| doc_tags | Array of strings Optional document tags for the new version. |
| content_url | string <uri> URL of the new content (use instead of file). |
| content_file | string <binary> File containing the new content (use instead of URL). |
{- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}Retrieves a paginated list of versions for a specific logical document, usually ordered newest first. Requires read access.
| document_id required | string <uuid> The UUID identifier of the logical document. |
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
{- "items": [
- {
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Submits new content for a document, which triggers the creation of a new document version. Requires write access.
| document_id required | string <uuid> The UUID identifier of the logical document. |
New content and optional version metadata
| title | string Optional title for the new version. If omitted, might inherit or be blank. |
| doc_tags | Array of strings Optional document tags for the new version. |
| content_url | string <uri> URL of the new content (use instead of file). |
| content_file | string <binary> File containing the new content (use instead of URL). |
{- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}Retrieves metadata specific to an immutable document version. Requires read access via repository.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
{- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "title": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "creator_username": "string",
- "doc_tags": [
- "string"
]
}Performs an authorization check and returns a short-lived presigned URL to download the metadata.json manifest file for this version directly from S3/CDN.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
Performs an authorization check (can user access this version?) and returns a short-lived presigned URL to download the raw text data for a specific chunk belonging to this version directly from S3/CDN.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
| chunk_hash required | string <sha256-hex> The SHA-256 hash identifier of the chunk. |
Performs one authorization check for the version and returns multiple short-lived presigned URLs for a requested list of chunk hashes belonging to this version. Efficiently retrieves access URLs needed for document reconstruction.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
List of chunk hashes to get URLs for.
| chunk_hashes required | Array of strings <sha256-hex> [ items <sha256-hex > ] |
{- "chunk_hashes": [
- "hash100",
- "hash101",
- "hash150"
]
}{- "presigned_urls": {
}
}Retrieves the list of document tags associated with a specific version. Requires read access.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
{- "tags": [
- "api",
- "design",
- "v1.1"
]
}Adds a document tag to a specific version. Requires write access to the parent document/repo. Idempotent.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
| tag_name required | string |
{- "tag_name": "reviewed"
}{- "tags": [
- "string"
]
}Removes a specific document tag from a version. Requires write access. Idempotent.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
| tag_name required | string The name of the document tag. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Executes a semantic search query against chunks within accessible repositories, based on provided text query and filters. Returns relevant chunks with context and presigned URLs for immediate snippet access. Results are paginated.
Search query and filters
| query required | string The natural language query for semantic search. |
object | |
| limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of results (chunks) to return. |
| page | integer <int32> >= 1 Default: 1 Page number for search results pagination. |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 10 Number of results per page. |
{- "query": "How does content defined chunking improve deduplication?",
- "filters": {
- "owner_username": "quanhua92",
- "repository_tags": [
- "storage",
- "optimization"
], - "document_tags": [
- "published"
]
}, - "limit": 10,
- "page": 1,
- "pageSize": 10
}{- "items": [
- {
- "chunk_hash": "string",
- "score": 0.1,
- "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
- "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
- "document_content_hash": "string",
- "s3_metadata_url_path": "string",
- "version_title": "string",
- "repository_name": "string",
- "owner_username": "string",
- "doc_tags": [
- "string"
]
}
], - "total": 0,
- "page": 0,
- "pageSize": 0
}Retrieves the list of tags associated with a specific repository. Requires read access.
| repository_id required | string <uuid> The UUID identifier of the repository. |
{- "tags": [
- "ai",
- "rust",
- "performance"
]
}Adds a tag to a specific repository. Requires write access. Idempotent (adding existing tag succeeds).
| repository_id required | string <uuid> The UUID identifier of the repository. |
| tag_name required | string |
{- "tag_name": "new-tag"
}{- "tags": [
- "string"
]
}Removes a specific tag from a repository. Requires write access. Idempotent.
| repository_id required | string <uuid> The UUID identifier of the repository. |
| tag_name required | string The name of the repository tag. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Retrieves the list of document tags associated with a specific version. Requires read access.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
{- "tags": [
- "api",
- "design",
- "v1.1"
]
}Adds a document tag to a specific version. Requires write access to the parent document/repo. Idempotent.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
| tag_name required | string |
{- "tag_name": "reviewed"
}{- "tags": [
- "string"
]
}Removes a specific document tag from a version. Requires write access. Idempotent.
| version_id required | string <uuid> The UUID identifier of the specific document version. |
| tag_name required | string The name of the document tag. |
{- "error": "UNAUTHENTICATED",
- "message": "Authentication token is required."
}Retrieves a paginated list of unique repository tag names used across all accessible repositories. Supports optional query filter.
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
| query | string Filter tags containing this substring. |
{- "items": [
- "ai",
- "rust",
- "storage",
- "optimization",
- "web"
], - "total": 150,
- "page": 1,
- "pageSize": 20
}Retrieves a paginated list of unique document tag names used across all accessible document versions. Supports optional query filter.
| page | integer <int32> >= 1 Default: 1 Page number to retrieve (starts at 1). |
| pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Number of items to return per page. |
| query | string Filter tags containing this substring. |
{- "items": [
- "api",
- "design",
- "v1.1",
- "draft",
- "published",
- "reviewed"
], - "total": 320,
- "page": 1,
- "pageSize": 20
}Retrieves publicly available information for a specific user. No token required.
| username required | string Username of the user to retrieve. |
{- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "username": "string"
}