Track 1,000 versions FREE with Anchor. After that, it's only $20/month. Start free →

Documentation API Reference

API Documentation

Syntaxia Anchor API

RESTful API for managing users, accounts, and profiles. All responses are in JSON format.

Base URL

https://anchor.staging.syntaxia.com

Version

v1

Format

JSON

Authentication

All API requests require authentication using a bearer token. Include your token in the Authorization header of every request.

How to authenticate

  1. 1. Get a token by calling /api/v1/auth with your credentials
  2. 2. Include the token in every request: Authorization: Bearer YOUR_TOKEN
  3. 3. Set Content-Type: application/json for all requests

Example

Request
curl -X POST "https://anchor.staging.syntaxia.com/api/v1/auth" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your-password",
    "otp_attempt": "123456"
  }'
Response ⚠️ Returns 401 if credentials are invalid
{
  "token": "eyJhbGciOiJIUzI1NiJ9..."
}

Quickstart

Get started in minutes with these code examples. Select your preferred language below.

1. List your accounts

export TOKEN="your-api-token"

curl "https://anchor.staging.syntaxia.com/api/v1/accounts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

2. Get current user

curl "https://anchor.staging.syntaxia.com/api/v1/me" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

User Management

Create and manage user accounts, update profiles, and handle authentication.

200/201 Success 401 Unauthorized 422 Validation Error
POST /api/v1/users

Create a new user account and receive an API token.

Request body
{
  "user": {
    "email": "new@example.com",
    "password": "secure-password",
    "password_confirmation": "secure-password",
    "name": "John Doe"
  }
}
Response
{
  "user": {
    "id": "usr_123",
    "email": "new@example.com",
    "name": "John Doe",
    "api_tokens": [{
      "id": "tok_123",
      "name": "API Token",
      "token": "your-generated-token"
    }]
  }
}
GET /api/v1/me

Get the currently authenticated user's profile.

Response
{
  "id": "usr_123",
  "name": "Ada Lovelace",
  "avatar_url": "https://cdn.syntaxia.io/avatar.png",
  "sgid": "user-sgid",
  "content": "<div>Profile HTML content</div>"
}
PUT /api/v1/password

Update the current user's password.

Request body
{
  "user": {
    "current_password": "old-password",
    "password": "new-password",
    "password_confirmation": "new-password"
  }
}
Response
{
  "success": true
}
DELETE /api/v1/me

Delete the current user account permanently.

⚠️ Returns an empty object on success. This action cannot be undone.

Accounts

Manage workspaces and team accounts. List accounts and view account details.

200 Success 401 Unauthorized 404 Not Found
GET /api/v1/accounts

List all accounts the authenticated user belongs to.

Response
[
  {
    "id": "acc_001",
    "name": "Main Workspace",
    "personal": false,
    "owner_id": "usr_123",
    "created_at": "2024-01-10T12:00:00Z",
    "updated_at": "2024-02-03T16:21:00Z",
    "account_users": [
      {"id": "acu_01", "user_id": "usr_123"}
    ]
  }
]

Notifications

Retrieve and manage user notifications. Mark notifications as read and list all notifications.

200 Success 401 Unauthorized
POST / DELETE /api/v1/notification_tokens

Register or remove push notification tokens (for Hotwire Native apps).

Request body
{
  "token": "device-push-token",
  "platform": "ios"
}

Connect your LLM to your workspace

Use the Model Context Protocol to safely expose your data to AI agents.

View MCP Guide