csreg

Users API

Endpoints for managing user profiles, API tokens, and starred skills.

Profile#

Retrieve the profile of the currently authenticated user.

GET/api/v1/users/me

Get the current user's profile information.

Auth: Required

Response

{
  "id": "uuid",
  "email": "alice@example.com",
  "displayName": "Alice",
  "avatarUrl": "https://example.com/avatar/alice.png",
  "createdAt": "2025-01-15T08:00:00Z"
}

Tokens#

Manage API tokens for programmatic access. Tokens are used for CLI authentication and CI/CD integrations.

GET/api/v1/users/me/tokens

List all API tokens for the current user. Token values are not included in the response.

Auth: Required

Response

{
  "data": [
    {
      "id": "uuid",
      "name": "CI Deploy Token",
      "scopes": ["read", "write"],
      "createdAt": "2025-06-01T12:00:00Z",
      "lastUsedAt": "2025-09-19T15:30:00Z",
      "expiresAt": "2026-06-01T12:00:00Z"
    }
  ]
}
POST/api/v1/users/me/tokens

Create a new API token. The raw token value is included in the response and will not be shown again.

Auth: Required (write)

Request Body

{
  "name": "CI Deploy Token",
  "scopes": ["read", "write"],
  "expiresAt": "2026-06-01T12:00:00Z"
}

Response

{
  "id": "uuid",
  "name": "CI Deploy Token",
  "token": "sk_abc123def456ghi789...",
  "scopes": ["read", "write"],
  "createdAt": "2025-09-20T10:00:00Z",
  "expiresAt": "2026-06-01T12:00:00Z"
}

Warning

The raw token value is only returned once at creation time. Store it securely immediately. If you lose the token, you will need to revoke it and create a new one.
DELETE/api/v1/users/me/tokens/:tokenId

Revoke an API token. The token will immediately stop working for all requests.

Auth: Required

Stars#

List all skills the current user has starred.

GET/api/v1/users/me/stars

List all skills starred by the current user.

Auth: Required

Response

{
  "data": [
    {
      "id": "uuid",
      "scope": "backend",
      "slug": "code-reviewer",
      "displayName": "Code Reviewer",
      "description": "Automated code review skill",
      "tags": ["review", "quality"],
      "skillType": "command",
      "downloads": 1250,
      "stars": 42,
      "latestVersion": "1.3.0",
      "starredAt": "2025-09-18T14:00:00Z"
    }
  ],
  "cursor": "uuid-of-last-item"
}