API Platform
Authentication
Learn how to authenticate your API requests using header-based credentials.
Learn how to authenticate your API requests using header-based credentials.
Product page: API Platform.
How Authentication Works
The Semust API uses header-based authentication. Every request must include two custom headers with your API user credentials.
| Header | Type | Description |
|---|---|---|
SEMUST-API-USER | string | Your API user's username |
SEMUST-API-PASSWORD | string | Your API user's password |
Both headers are required on every request. If either is missing or incorrect, the API will return a 401 error.
SEMUST-API-USER: your_username
SEMUST-API-PASSWORD: your_passwordCreating API Users
API requests are authenticated using API users. Each API user has its own username and password that you include as headers in your requests.
Open API Access
Go to the API Access page in your dashboard.
Create an API user
Click "Create API User" to generate a new API user with a unique username and password.
Copy the credentials
Copy the username and password. Use these values as
SEMUST-API-USERandSEMUST-API-PASSWORDheaders in your API requests.
You can create multiple API users to separate usage across different applications or environments.
Security:
Never expose your API user credentials in client-side code, public repositories, or browser requests. Always make API calls from your server.
Authentication Errors
If authentication fails, the API returns HTTP 401 with the following error:
| HTTP | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | Authentication failed — invalid username or password |
Double-check that both SEMUST-API-USER and SEMUST-API-PASSWORD headers are present and correct. You can verify your credentials on the API Access page.
{
"error": "Authentication failed — invalid username or password",
"code": "INVALID_API_KEY"
}