Authentication

Note: API access requires a team account. Personal accounts do not support API access.

All API requests require an API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Generate your API key from the team management dashboard.

Base URL

https://atypica.musedam.cc/api

List Members

GET/team/members

List all team members.

Request

curl -X GET https://atypica.musedam.cc/api/team/members \
  -H "Authorization: Bearer YOUR_API_KEY"

Response (200 OK)

{
  "success": true,
  "data": [
    {
      "id": 42,
      "name": "John Doe",
      "email": "john@example.com",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "personalUserId": 123
    }
  ]
}

Create User

POST/team/members/create

Create a new user and add them to the team. The email domain must be verified in your team's domain whitelist.

Note: Users created via API do not receive signup token bonuses.

Request Body

{
  "email": "user@verified-domain.com",
  "password": "optional_password"
}

Request

curl -X POST https://atypica.musedam.cc/api/team/members/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@verified-domain.com"}'

Response (200 OK)

{
  "success": true,
  "data": {
    "id": 789,
    "email": "user@verified-domain.com",
    "name": "user",
    "personalUserId": 456,
    "teamUserId": 789,
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}

Invite User

POST/team/members/invite

Invite an existing user to join the team. The user must already have a registered account, and their email domain must be verified in your team's domain whitelist.

Request Body

{
  "email": "existinguser@verified-domain.com"
}

Request

curl -X POST https://atypica.musedam.cc/api/team/members/invite \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "existinguser@verified-domain.com"}'

Response (200 OK)

{
  "success": true,
  "data": {
    "id": 790,
    "personalUserId": 456,
    "teamIdAsMember": 1,
    "name": "User Name",
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}

Impersonation

POST/team/members/:userId/impersonation

Generate impersonation login URL for a team member. The member's email domain must be verified in your team's domain whitelist.

Security Note: This endpoint requires the member's email domain to be in your team's verified domain whitelist. This prevents impersonation of users from unauthorized domains.

Path Parameters

userIdnumberTeam member user ID

Request Body (optional)

{
  "expiryHours": 24,
  "callbackUrl": "/newstudy"
}

expiryHours (number, optional): Token validity in hours. Default: 24

callbackUrl (string, optional): URL to redirect after login. Default: "/"

Request

curl -X POST https://atypica.musedam.cc/api/team/members/42/impersonation \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expiryHours": 24, "callbackUrl": "/newstudy"}'

Response (200 OK)

{
  "success": true,
  "data": {
    "loginUrl": "https://atypica.musedam.cc/auth/impersonation-login?token=...&callbackUrl=%2Fnewstudy",
    "expiryHours": 24,
    "expiresAt": "2024-01-02T00:00:00.000Z",
    "callbackUrl": "/newstudy"
  }
}

Error Responses

401 Unauthorized

{
  "success": false,
  "error": "Unauthorized: API Key is required"
}

403 Forbidden (Domain Not Verified)

{
  "success": false,
  "error": "Domain example.com is not in the team's whitelist"
}

404 Not Found

{
  "success": false,
  "error": "Member not found in this team"
}

500 Internal Server Error

{
  "success": false,
  "error": "Internal server error"
}

Rate Limits

API requests are currently not rate-limited, but please use responsibly.

Rate limiting may be enforced in the future. We recommend implementing exponential backoff in your client.

API Documentation | atypica.AI