Projects

Organize your licenses and API keys into projects. Each project acts as a container for a separate application or product you want to manage independently.

Response Fields

FieldTypeDescription
idstringUnique internal identifier (UUID)
clientIdstringPublic identifier for this project. Embed in your app for license validation.
namestringDisplay name of the project
createdAtstringISO 8601 timestamp of when the project was created
updatedAtstringISO 8601 timestamp of the last update

List Projects

GET/api/v1/projects
Requestbash
curl https://onyxauth.xyz/api/v1/projects \
  -H "Cookie: session-token=..."
200 OKjson
{
  "success": true,
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "clientId": "proj_aBcDeFgHiJkLmNoPqRsTuVwX",
      "name": "My Game",
      "createdAt": "2026-01-15T10:30:00.000Z",
      "updatedAt": "2026-01-15T10:30:00.000Z"
    }
  ]
}

Create Project

POST/api/v1/projects
Request bodyjson
{
  "name": "My SaaS App"
}

Parameters

FieldTypeRequiredDescription
namestringYes1-255 characters
201 Createdjson
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "clientId": "proj_aBcDeFgHiJkLmNoPqRsTuVwX",
    "name": "My SaaS App",
    "createdAt": "2026-02-01T12:00:00.000Z",
    "updatedAt": "2026-02-01T12:00:00.000Z"
  }
}

Get Project

GET/api/v1/projects/:id
200 OKjson
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "clientId": "proj_aBcDeFgHiJkLmNoPqRsTuVwX",
    "name": "My SaaS App",
    "createdAt": "2026-02-01T12:00:00.000Z",
    "updatedAt": "2026-02-01T12:00:00.000Z"
  }
}

Update Project

PATCH/api/v1/projects/:id
Request bodyjson
{
  "name": "Renamed Project"
}
200 OKjson
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "clientId": "proj_aBcDeFgHiJkLmNoPqRsTuVwX",
    "name": "Renamed Project",
    "updatedAt": "2026-02-05T08:00:00.000Z"
  }
}

Delete Project

DELETE/api/v1/projects/:id

Deleting a project cascades to all licenses and API keys within it. You cannot delete your last remaining project.

200 OKjson
{
  "success": true,
  "data": {
    "deleted": true
  }
}
400 - Cannot delete last projectjson
{
  "success": false,
  "error": {
    "code": "LAST_PROJECT",
    "message": "Cannot delete your last project"
  }
}

Scoping Licenses & API Keys

Pass a projectId query parameter when listing licenses or API keys to filter by project. Include projectId in the request body when creating them.

List licenses for a projectbash
curl "https://onyxauth.xyz/api/v1/licenses?projectId=a1b2c3d4-..." \
  -H "Cookie: session-token=..."
Search licenses within a projectbash
curl "https://onyxauth.xyz/api/v1/licenses?projectId=a1b2c3d4-...&search=my+app" \
  -H "Cookie: session-token=..."