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
| Field | Type | Description |
|---|---|---|
| id | string | Unique internal identifier (UUID) |
| clientId | string | Public identifier for this project. Embed in your app for license validation. |
| name | string | Display name of the project |
| createdAt | string | ISO 8601 timestamp of when the project was created |
| updatedAt | string | ISO 8601 timestamp of the last update |
List Projects
GET
/api/v1/projectsRequestbash
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/projectsRequest bodyjson
{
"name": "My SaaS App"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | 1-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/:id200 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/:idRequest 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/:idDeleting 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=..."