API Tokens
Create and manage API tokens for programmatic access. Tokens can be used in the SDK, CLI, or direct API calls. All endpoints require Authorization: Bearer TOKEN.
Create Token
POST /api/v1/tokensBody:
{
"name": "CI/CD Token"
}Response: 201
{
"id": "tok_abc123",
"name": "CI/CD Token",
"token": "et_xxxxxxxxxxxxxxxxxxxx",
"created_at": "2025-01-15T10:30:00Z"
}The token value is only shown once at creation. Store it securely — it cannot be retrieved later.
List Tokens
GET /api/v1/tokensResponse: 200
[
{
"id": "tok_abc123",
"name": "CI/CD Token",
"last_used_at": "2025-01-20T14:00:00Z",
"created_at": "2025-01-15T10:30:00Z"
}
]Token values are never returned in list responses.
Delete Token
DELETE /api/v1/tokens/:idUsing Tokens
In the SDK
import { EspaceTech } from "@espace-tech/sdk";
const client = new EspaceTech({
apiToken: "et_xxxxxxxxxxxxxxxxxxxx",
});In API Calls
curl https://api.espace-tech.com/api/v1/projects \
-H "Authorization: Bearer et_xxxxxxxxxxxxxxxxxxxx"In CI/CD
# GitHub Actions example
env:
ESPACE_TECH_TOKEN: $\{{ secrets.ESPACE_TECH_TOKEN }}
steps:
- run: espacetech deploy