https://api.bluecollarfiremen.com
https://api.bluecollarfiremen.com
The Blue Collar Firemen API provides user authorization management for platform integrations. This API allows you to add and remove access to our content platform for your users.
https://api.bluecollarfiremen.com
application/json
All API requests require authentication using an API key sent in the request headers.
Keep your API key secure and never expose it in client-side code.
X-API-Key: your_api_key_here
If you're looking to get API access for your users, please reach out to support@bluecollarfiremen.com
Add user access to the platform. Creates a user if they don't exist and assigns access.
{
"user_email": "user@example.com",
"user_name": "John Doe"
}
Field | Type | Required | Description |
---|---|---|---|
user_email | string | Required | User's email address |
user_name | string | Optional | User's display name |
{
"message": "User created and access assigned successfully",
"user_id": 12345,
"access_id": 67890
}
{
"message": "Existing user found with existing access",
"user_id": 12345,
"access_id": 67890
}
Remove user access from the platform. Revokes their permission to view content.
{
"user_email": "user@example.com"
}
Field | Type | Required | Description |
---|---|---|---|
user_email | string | Required | user's email address |
{
"message": "Access revoked successfully",
"user_id": 12345,
"access_id": 67890
}
Generate an SSO (Single Sign-On) login URL for an existing user. This endpoint creates a secure, tokenized URL that allows users to access the platform without entering credentials.
{
"user_email": "user@example.com"
}
Field | Type | Required | Description |
---|---|---|---|
user_email | string | Required | Email address of the user to generate login URL for |
{
"url": "https://app.bluecollarfiremen.com/sso/login?token=abc123xyz"
}
The returned URL is time-limited and single-use for security purposes.
User must exist and have active access. Login URLs are time-limited and single-use only.
Status Code | Error | Description |
---|---|---|
400 | Bad Request | Missing required user_email field |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | User doesn't have access |
404 | Not Found | User not found |
405 | Method Not Allowed | Only POST and DELETE methods are supported (/user), only POST for /user/login |
500 | Internal Server Error | Server error processing the request |
curl -X POST https://api.bluecollarfiremen.com/user \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"user_email": "user@example.com",
"user_name": "John Doe"
}'
curl -X DELETE https://api.bluecollarfiremen.com/user \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"user_email": "user@example.com"
}'
curl -X POST https://api.bluecollarfiremen.com/user/login \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"user_email": "user@example.com"
}'
const response = await fetch('https://api.bluecollarfiremen.com/user', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
user_email: 'user@example.com',
user_name: 'John Doe'
})
});
const result = await response.json();
console.log(result);
const response = await fetch('https://api.bluecollarfiremen.com/user', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
user_email: 'user@example.com'
})
});
const result = await response.json();
console.log(result);
const response = await fetch('https://api.bluecollarfiremen.com/user/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
user_email: 'user@example.com'
})
});
const result = await response.json();
console.log(result.url); // Use the URL to redirect user