API reference
Environment variables
/ v1/ orgs/ :orgId/ projects/ :projectId/ envLists the Serverless App Service's variables, and shared: the organization's shared variables (a Serverless App Service variable with the same key replaces a shared one per environment). Values of sensitive variables are null.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).
Errors
404Serverless App Service not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
vars: {
version: number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
rotateEveryDays: null | number
rotationDueAt: null | number
value: null | string
key: string
createdAt?: number
updatedAt?: number
orgId: string
projectId: string
targets: ("preview" | "production" | "development")[]
sensitive?: boolean
devReadable?: boolean
updatedBy: string
valueUpdatedAt?: number
}[]
shared: {
version: number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
rotateEveryDays: null | number
rotationDueAt: null | number
value: null | string
key: string
createdAt?: number
updatedAt?: number
orgId: string
projectId: string
targets: ("preview" | "production" | "development")[]
sensitive?: boolean
devReadable?: boolean
updatedBy: string
valueUpdatedAt?: number
}[]
}/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ valuesOne environment's variables as a deployment gets them (shared ones overridden by the Serverless App Service's), for local development (cactive env pull, cactive dev). Sensitive values are null, except development-only secrets marked devReadable when the caller has env:write (audited as env.reveal).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
- Allowed
env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).
Query parameters
environment"production" | "preview" | "development"Default
"development".
Errors
404Serverless App Service not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/values' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
environment: "preview" | "production" | "development"
vars: {
key: string
value: null | string
sensitive: boolean
devReadable?: true
shared?: true
}[]
}/ v1/ orgs/ :orgId/ projects/ :projectId/ envCreates or replaces many variables at once (e.g. a pasted .env file), all with the same environments and sensitivity. Nothing is written unless every key is valid.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).
Request body
varsobject[]required1–200 items.
vars[].keystringrequired1–256 characters.
vars[].valuestringrequiredUp to 65,536 characters.
targets("production" | "preview" | "development")[]requiredAt least 1 item.
sensitivebooleanDefault
true.devReadablebooleanDefault
false.
Errors
400Invalid names: …. Use letters, numbers and underscores, not starting with a number.400Reserved by the platform: ….400Only sensitive variables for Development alone can be readable by developers.404Serverless App Service not found429Your plan allows … secrets. Remove some you no longer need, or change plans.503Some variables weren't saved. Try again.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"vars": [
{
"key": "example",
"value": "example"
}
],
"targets": [
"production"
]
}'Response 200
{
keys: string[]
targets: ("preview" | "production" | "development")[]
sensitive: boolean
devReadable: boolean
}/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :keyCreates or replaces a variable. Omit value to keep the stored value, for example to change the targets of a sensitive variable.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Request body
valuestringUp to 65,536 characters.
targets("production" | "preview" | "development")[]requiredAt least 1 item.
sensitivebooleanDefault
true.devReadablebooleanDefault
false.
Errors
400Use letters, numbers and underscores, not starting with a number.400… is reserved by the platform.400Only sensitive variables for Development alone can be readable by developers.400Enter a value.400Enter a new value to make this variable visible.400Enter a new value to make this secret readable by developers.404Serverless App Service not found429Your plan allows … secrets. Remove some you no longer need, or change plans.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"targets": [
"production"
]
}'Response 200
{
key: string
targets: ("preview" | "production" | "development")[]
sensitive: boolean
devReadable: boolean
version: number
}/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :keyDeletes a variable. Running deployments keep the value they started with.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Errors
404Serverless App Service not found
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 204 with no body
/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :key/ valueReads a value back (version: an earlier one). Sensitive values only as their access rule allows; audited.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
- Allowed
env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Query parameters
versioninteger≥ 1. Coerced from a string.
Errors
403Earlier versions of this secret follow its access rule, which doesn't include you.404Variable not found404That version isn't kept any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}/value' \
-H "Authorization: Bearer $CACTIVE_TOKEN"/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :key/ versionsThe versions kept (when each was set and by whom), newest first.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Errors
404Variable not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}/versions' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: string
current: number
versions: {
version: number
createdAt?: number
createdBy: string
current: boolean
}[]
}/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :key/ versions/ :version/ restoreSets an earlier value again, as a new version. Takes effect on the next deployment.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.versionA published journey version's number (1, 2, …).
Errors
404Variable not found404That version isn't kept any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}/versions/{version}/restore' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: string
version: number
}/ v1/ orgs/ :orgId/ projects/ :projectId/ env/ :key/ settingsA rotation reminder and who may read the value back.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- env:write, keys:write (when
body.access !== undefined)
Path parameters
orgIdOrganization id (
org_…).projectIdServerless App Service id (
prj_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Request body
rotateEveryDaysintegeror null1–3650.
accessobjector nullaccess.roles[]Default
[]. Up to 4 items.access.teamsstring[]Default
[]. Up to 50 items. Each 1–64 characters.access.ownersOnlyboolean
Errors
404Variable not found
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/projects/{projectId}/env/{key}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"rotateEveryDays": 1,
"access": {
"roles": [],
"teams": [],
"ownersOnly": true
}
}'Response 200
{
key: string
rotateEveryDays: null | number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
}/ v1/ orgs/ :orgId/ envLists the organization's shared variables. Sensitive values are null.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
Path parameters
orgIdOrganization id (
org_…).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/env' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
vars: {
version: number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
rotateEveryDays: null | number
rotationDueAt: null | number
value: null | string
key: string
createdAt?: number
updatedAt?: number
orgId: string
projectId: string
targets: ("preview" | "production" | "development")[]
sensitive?: boolean
devReadable?: boolean
updatedBy: string
valueUpdatedAt?: number
}[]
}/ v1/ orgs/ :orgId/ envCreates or replaces many shared variables at once, all with the same environments and sensitivity.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).
Request body
varsobject[]required1–200 items.
vars[].keystringrequired1–256 characters.
vars[].valuestringrequiredUp to 65,536 characters.
targets("production" | "preview" | "development")[]requiredAt least 1 item.
sensitivebooleanDefault
true.devReadablebooleanDefault
false.
Errors
400Invalid names: …. Use letters, numbers and underscores, not starting with a number.400Reserved by the platform: ….400Only sensitive variables for Development alone can be readable by developers.429Your plan allows … secrets. Remove some you no longer need, or change plans.503Some variables weren't saved. Try again.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/env' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"vars": [
{
"key": "example",
"value": "example"
}
],
"targets": [
"production"
]
}'Response 200
{
keys: string[]
targets: ("preview" | "production" | "development")[]
sensitive: boolean
devReadable: boolean
}/ v1/ orgs/ :orgId/ env/ :keyCreates or replaces a shared variable. Omit value to keep the stored one.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Request body
valuestringUp to 65,536 characters.
targets("production" | "preview" | "development")[]requiredAt least 1 item.
sensitivebooleanDefault
true.devReadablebooleanDefault
false.
Errors
400Use letters, numbers and underscores, not starting with a number.400… is reserved by the platform.400Only sensitive variables for Development alone can be readable by developers.400Enter a value.400Enter a new value to make this variable visible.400Enter a new value to make this secret readable by developers.429Your plan allows … secrets. Remove some you no longer need, or change plans.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"targets": [
"production"
]
}'Response 200
{
key: string
targets: ("preview" | "production" | "development")[]
sensitive: boolean
devReadable: boolean
version: number
}/ v1/ orgs/ :orgId/ env/ :keyDeletes a shared variable. Serverless App Services' own variables with the same key are unaffected.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 204 with no body
/ v1/ orgs/ :orgId/ env/ :key/ valueReads a value back (version: an earlier one). Sensitive values only as their access rule allows; audited.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
- Allowed
env:write
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Query parameters
versioninteger≥ 1. Coerced from a string.
Errors
403Earlier versions of this secret follow its access rule, which doesn't include you.404Variable not found404That version isn't kept any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}/value' \
-H "Authorization: Bearer $CACTIVE_TOKEN"/ v1/ orgs/ :orgId/ env/ :key/ versionsThe versions kept (when each was set and by whom), newest first.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Errors
404Variable not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}/versions' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: string
current: number
versions: {
version: number
createdAt?: number
createdBy: string
current: boolean
}[]
}/ v1/ orgs/ :orgId/ env/ :key/ versions/ :version/ restoreSets an earlier value again, as a new version. Takes effect on the next deployment.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:write
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.versionA published journey version's number (1, 2, …).
Errors
404Variable not found404That version isn't kept any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}/versions/{version}/restore' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: string
version: number
}/ v1/ orgs/ :orgId/ env/ :key/ settingsA rotation reminder and who may read the value back.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- env:write, keys:write (when
body.access !== undefined)
Path parameters
orgIdOrganization id (
org_…).keyVariable name; under
marketingjourneys a person's key: their email address, mobile (E.164) orrec:<record id>, URL-encoded.
Request body
rotateEveryDaysintegeror null1–3650.
accessobjector nullaccess.roles[]Default
[]. Up to 4 items.access.teamsstring[]Default
[]. Up to 50 items. Each 1–64 characters.access.ownersOnlyboolean
Errors
404Variable not found
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/env/{key}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"rotateEveryDays": 1,
"access": {
"roles": [],
"teams": [],
"ownersOnly": true
}
}'Response 200
{
key: string
rotateEveryDays: null | number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
}/ v1/ orgs/ :orgId/ secretsEvery secret in the organization (shared ones and each Serverless App Service's sensitive variables): key, targets, current version, last change and by whom, rotation reminder and when it's due, and the access rule. Never values. Also limit, the plan's secretsMax. Needs env:read.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- env:read
Path parameters
orgIdOrganization id (
org_…).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/secrets' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
secrets: {
project: null | {
projectId: string
name: string
}
shared: boolean
version: number
access: null | {
roles?: string[]
teams?: string[]
ownersOnly?: boolean
}
rotateEveryDays: null | number
rotationDueAt: null | number
value: null | string
key: string
createdAt?: number
updatedAt?: number
orgId: string
projectId: string
targets: ("preview" | "production" | "development")[]
sensitive?: boolean
devReadable?: boolean
updatedBy: string
valueUpdatedAt?: number
}[]
limit: number
}