Flux API Keys
Flux API keys authenticate delivery traffic against your Flux APIs. Each key belongs to an environment and can optionally inherit a Flux API Role. When a key has a role, its requests are limited to the APIs that role can read.
A key’s full secret_key is returned only once at creation time. All subsequent responses include a masked value, and the service never stores the raw secret. Store the secret securely when you create the key.
Path Parameters
- Name
:env- Type
- string
- Description
Environment key that owns the API keys.
- Name
:apiKey- Type
- string
- Description
Unique identifier of the Flux API key (
keyfield).
Endpoints live under /v1/:env/roles/flux-api/api-keys/….
Flux API Key Object
- Name
key- Type
- string
- Description
Internal identifier for the API key.
- Name
description- Type
- string
- Description
Optional label (recommended max 100 characters).
- Name
public_key- Type
- string
- Description
Public component of the API key. Use in the
X-Fox-Public-Keyheader when calling Flux APIs.
- Name
secret_key- Type
- string
- Description
Secret component of the key. Masked in all responses except the initial creation response.
- Name
role- Type
- string | null
- Description
Flux role key assigned to this API key, or
nullfor unrestricted access.
- Name
environment- Type
- string
- Description
Key of the environment that owns the key.
- Name
created_at- Type
- datetime
- Description
ISO 8601 timestamp when the key was created.
List Flux API Keys
Lists all Flux API keys in the environment. Supports standard limit/offset pagination.
Success Response: 200 OK
Query Parameters
- Name
limit- Type
- integer
- Default
- default:100
- Description
Number of keys per page.
- Name
offset- Type
- integer
- Default
- default:0
- Description
Number of keys to skip before starting the page.
Errors
- Name
401 Unauthorized- Description
Missing or invalid credentials.
authentication_failed- authentication credentials were not provided or are invalid
- Name
403 Forbidden- Description
Caller lacks permission to view Flux API keys.
permission_denied- insufficient permissions to perform this action
Request
curl https://api.foxnose.net/v1/7c9h4pwu/roles/flux-api/api-keys/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..."
Response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"key": "flux_key_v1",
"description": "Blog delivery key",
"public_key": "flux_pub_7Lx...",
"secret_key": "flux_sec***********3kP",
"role": "gq9kLm42",
"environment": "7c9h4pwu",
"created_at": "2024-01-15T10:50:00Z"
}
]
}
Create Flux API Key
Generates a new Flux API key and returns the full credentials once.
Success Response: 201 Created
Request Body
- Name
description- Type
- string
- Default
- default:''
- Description
Optional label for the key
- Maximum length: 100
- Name
role- Type
- string | null
- Default
- default:null
- Description
Optional Flux role key. Omit the field or set
nullto create an unrestricted key.
Errors
- Name
401 Unauthorized- Description
Missing or invalid credentials.
- Name
403 Forbidden- Description
Caller lacks permission to create Flux API keys.
permission_denied- insufficient permissions to perform this action
- Name
404 Not Found- Description
Role not found (when
roleis provided).role_not_found- specified Flux role does not exist
- Name
422 Unprocessable Content- Description
Validation or plan limit error.
validation_error- request body failed validationtoo_many_flux_api_keys- environment reached its Flux API key limit
Request
curl https://api.foxnose.net/v1/7c9h4pwu/roles/flux-api/api-keys/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json" \
-d '{
"description": "Blog delivery key",
"role": "gq9kLm42"
}'
Response
{
"key": "flux_key_v1",
"description": "Blog delivery key",
"public_key": "flux_pub_7LxXj8sYfH4Pn",
"secret_key": "flux_sec_Jw9bSmcM4r5uTQ1g",
"role": "gq9kLm42",
"environment": "7c9h4pwu",
"created_at": "2024-01-15T10:50:00Z"
}
Save both public_key and secret_key now. Once you close the response, the API cannot show the full secret again.
Retrieve Flux API Key
Retrieves metadata for a specific key. The secret_key property is masked.
Success Response: 200 OK
Errors
- Name
401 Unauthorized- Description
Missing or invalid credentials.
- Name
403 Forbidden- Description
Caller lacks permission to view Flux API keys.
- Name
404 Not Found- Description
Key not found in the environment.
api_key_not_found- the specified key does not exist
Request
curl https://api.foxnose.net/v1/7c9h4pwu/roles/flux-api/api-keys/flux_key_v1/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..."
Response
{
"key": "flux_key_v1",
"description": "Blog delivery key",
"public_key": "flux_pub_7Lx...",
"secret_key": "flux_sec***********3kP",
"role": "gq9kLm42",
"environment": "7c9h4pwu",
"created_at": "2024-01-15T10:50:00Z"
}
Update Flux API Key
Updates the key’s description and/or assigned role.
Success Response: 200 OK
Request Body
- Name
description- Type
- string
- Default
- default:''
- Description
Updated label for the key
- Maximum length: 100
- Name
role- Type
- string | null
- Description
Flux role key, or
nullto remove the role assignment.
Errors
- Name
401 Unauthorized- Description
Missing or invalid credentials.
- Name
403 Forbidden- Description
Caller lacks permission to update Flux API keys.
- Name
404 Not Found- Description
Key or role not found.
api_key_not_found- the specified key does not existrole_not_found- the role does not exist (when provided)
- Name
422 Unprocessable Content- Description
Validation error.
validation_error- request body failed validation
Request
curl -X PUT https://api.foxnose.net/v1/7c9h4pwu/roles/flux-api/api-keys/flux_key_v1/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json" \
-d '{
"description": "Partner blog key",
"role": null
}'
Response
{
"key": "flux_key_v1",
"description": "Partner blog key",
"public_key": "flux_pub_7Lx...",
"secret_key": "flux_sec***********3kP",
"role": null,
"environment": "7c9h4pwu",
"created_at": "2024-01-15T10:50:00Z"
}
Delete Flux API Key
Deletes the key and clears cached credentials. The deletion immediately revokes access.
Success Response: 204 No Content
Errors
- Name
401 Unauthorized- Description
Missing or invalid credentials.
- Name
403 Forbidden- Description
Caller lacks permission to delete Flux API keys.
- Name
404 Not Found- Description
Key not found in the environment.
api_key_not_found- the specified key does not exist
Request
curl -X DELETE https://api.foxnose.net/v1/7c9h4pwu/roles/flux-api/api-keys/flux_key_v1/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..."