Namespace API
Claim a branded @namespace prefix on the awsys.co domain (Pro+)
A namespace lets you brand your short links on the shared awsys.co domain without a custom domain. Once claimed, all your new links are created under awsys.co/@yournamespace/slug (e.g. awsys.co/@acme/launch). Each account can hold one namespace at a time. Namespaces require Pro or higher.
Base URL
https://awsys.co
Authentication
All namespace endpoints require a valid API key (Pro+). See the Authentication page for details.
Authorization: Bearer YOUR_API_KEY
Check Namespace Availability
GET /api/namespace/check/:namespace
Check whether a namespace string is available to claim. Requires Pro or higher.
Response
{
"namespace": "acme",
"available": true,
"reason": null,
"previewUrl": "awsys.co/@acme/"
}
| Field | Description |
|---|---|
available | true if the namespace can be claimed |
reason | Why the namespace is unavailable (reserved, taken, invalid format), or null if available |
previewUrl | What your links would look like, or null if unavailable |
curl example
curl https://awsys.co/api/namespace/check/acme \
-H "Authorization: Bearer YOUR_API_KEY"
Claim a Namespace
POST /api/user/namespace
Claims a namespace for your account. You can only hold one namespace at a time — release your current one before claiming a different namespace.
Request body
{
"namespace": "acme"
}
Response — 200 OK
{
"success": true,
"namespace": "acme",
"previewUrl": "awsys.co/@acme/",
"message": "Successfully claimed @acme"
}
curl example
curl -X POST https://awsys.co/api/user/namespace \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"namespace": "acme"}'
Release a Namespace
DELETE /api/user/namespace
Releases your current namespace. This makes it immediately available for other users to claim. Existing links created under the namespace will continue to redirect, but new links will no longer use the prefix.
Response — 200 OK
{ "success": true }
curl example
curl -X DELETE https://awsys.co/api/user/namespace \
-H "Authorization: Bearer YOUR_API_KEY"
Get Current Namespace
Your active namespace is returned in the GET /api/user/profile response under the userPrefix field (for legacy links) and in the namespace endpoints. The full namespace object is also part of the namespace check response for your own namespace.
Error Codes
| Code | HTTP | Description |
|---|---|---|
TIER_REQUIRED | 403 | Namespaces require Pro or higher. |
MISSING_NAMESPACE | 400 | The namespace field is required. |
NAMESPACE_EXISTS | 400 | You already have a namespace. Release it before claiming another. |
NAMESPACE_UNAVAILABLE | 400 | The namespace is reserved, already taken, or has an invalid format. |
NO_NAMESPACE | 404 | You do not have a namespace to release. |