Back to Documentation

API Documentation

Integrate MemorySpace with your applications using our REST API. Manage spaces, upload transcriptions, and access your knowledge base programmatically.

Authentication

All API requests require authentication using an API key. Include your API key in theAuthorizationheader.

curl -X GET "https://memoryspace.ai/api/v1/spaces" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Keep your API key secure

Never expose your API key in client-side code or public repositories. Rotate keys regularly and use environment variables.

Getting an API Key

  1. Go to your Settings > API Keys
  2. Click "Create API Key"
  3. Give your key a name and select the required scopes
  4. Copy and securely store your key (it won't be shown again)

API Scopes

API keys are created with specific scopes that control access. Request only the scopes you need.

read:spacesRead access to spaces/categories
write:spacesCreate and modify spaces
read:transcriptionsRead access to transcription jobs and content
write:transcriptionsCreate transcription jobs
read:documentsRead access to knowledge base documents
write:documentsUpload and modify documents

Spaces

Manage your knowledge spaces

GET
/api/v1/spaces
List all spaces for the authenticated user
Required scope:read:spaces

Query Parameters

limit(number)- Max results (default: 50, max: 100)
offset(number)- Pagination offset
include_system(boolean)- Include system spaces

Response

{
  "success": true,
  "data": {
    "spaces": [
      {
        "id": "uuid",
        "name": "My Space",
        "description": "Space description",
        "is_active": true,
        "created_at": "2024-01-01T00:00:00Z"
      }
    ],
    "pagination": { "total": 10, "limit": 50, "offset": 0 }
  }
}
POST
/api/v1/spaces
Create a new space
Required scope:write:spaces

Request Body

name(string)
required
- Space name
description(string)- Space description
template_id(string)- Template ID to apply

Response

{
  "success": true,
  "data": {
    "id": "uuid",
    "name": "My Space",
    "description": "Space description",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Transcriptions

Upload audio and manage transcriptions

GET
/api/v1/transcriptions
List transcription jobs
Required scope:read:transcriptions

Query Parameters

limit(number)- Max results (default: 50, max: 100)
offset(number)- Pagination offset
status(string)- Filter by status (pending, processing, completed, failed)
category_id(string)- Filter by space ID

Response

{
  "success": true,
  "data": {
    "transcriptions": [
      {
        "id": "uuid",
        "file_name": "meeting.mp3",
        "status": "completed",
        "duration_seconds": 3600,
        "created_at": "2024-01-01T00:00:00Z"
      }
    ],
    "pagination": { "total": 10, "limit": 50, "offset": 0 }
  }
}
POST
/api/v1/transcriptions
Create a new transcription job
Required scope:write:transcriptions

Request Body

file_url(string)
required
- URL to audio/video file
file_name(string)
required
- Original file name
category_id(string)- Space ID to organize under
language(string)- Language code (default: auto)

Response

{
  "success": true,
  "data": {
    "id": "uuid",
    "file_name": "meeting.mp3",
    "status": "pending",
    "created_at": "2024-01-01T00:00:00Z"
  }
}
GET
/api/v1/transcriptions/:id
Get transcription details including transcript text
Required scope:read:transcriptions

Response

{
  "success": true,
  "data": {
    "id": "uuid",
    "file_name": "meeting.mp3",
    "status": "completed",
    "duration_seconds": 3600,
    "transcript": {
      "text": "Full transcript text...",
      "srt": "SRT format...",
      "vtt": "VTT format..."
    }
  }
}

Documents

Manage knowledge base documents

GET
/api/v1/documents
List documents in the knowledge base
Required scope:read:documents

Query Parameters

limit(number)- Max results (default: 50, max: 100)
offset(number)- Pagination offset
category_id(string)- Filter by space ID
status(string)- Filter by status

Response

{
  "success": true,
  "data": {
    "documents": [
      {
        "id": "uuid",
        "file_name": "report.pdf",
        "file_type": "pdf",
        "status": "completed",
        "created_at": "2024-01-01T00:00:00Z"
      }
    ],
    "pagination": { "total": 10, "limit": 50, "offset": 0 }
  }
}
POST
/api/v1/documents
Upload a new document to a space
Required scope:write:documents

Request Body

category_id(string)
required
- Space ID
file_name(string)
required
- File name
file_url(string)- URL to file (for remote files)
text_content(string)- Direct text content
file_type(string)- File type (pdf, txt, md, etc.)

Response

{
  "success": true,
  "data": {
    "id": "uuid",
    "file_name": "report.pdf",
    "file_type": "pdf",
    "status": "pending",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Error Handling

The API uses standard HTTP status codes. Errors return a consistent JSON structure:

{
  "success": false,
  "error": "Error message describing what went wrong"
}

Common Status Codes

200Success
201Created successfully
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient scope permissions
404Not found - resource doesn't exist
409Conflict - resource already exists
429Rate limited - too many requests
500Internal server error

Rate Limits

API requests are rate limited based on your subscription tier:

Free

100

requests/hour

Pro

1,000

requests/hour

Enterprise

Custom

Contact sales

Rate limit headers are included in all responses:X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset

Ready to integrate?

Create an API key and start building with MemorySpace.