Attach a firewall preset
Attaches a preset at a company, a website, one environment or yourself, so every range of the preset may connect over SSH. The ranges follow the preset as Corefinity updates it.
Body
At least 1.
The level an address is held at. user is yourself.
environmentwebsitecompanyuserThe id of a preset, as GET /firewall/presets answers it. At least 1.
Returns
201 The preset was attached. Follow change_id with GET /firewall/changes/{change}.
Fields of the 201 answer
A preset attached at one owner.
Fields
Who added an address or made a change.
Fields
Null when the person has been removed, or when Corefinity support added the address.
The person Corefinity support added it for.
True when Corefinity support added the address for a customer.
Format: date-time.
Whether you may detach it.
The id DELETE / takes.
agencycompanywebsiteenvironmentuserpresethttp_auth_ruleWhere an address is held: a company, a website, an environment or a person. http_auth_rule is an address carried over with a password-protected path.
Fields
At least 1.
companywebsiteenvironmentuserhttp_auth_ruleThe published address ranges of a common service, kept up to date by Corefinity.
Fields
At least 1.
How many ranges the preset holds.
The preset's short name. Detaching it asks you to send this back.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | firewall_not_editable | You can see this entry but you cannot change it. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
422 | firewall_preset_present | That preset is already attached here. |
422 | invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
429 | firewall_throttled | Too many firewall changes. Wait a minute and try again. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/firewall/preset-subscriptions \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"owner_id": 1204,
"owner_type": "company",
"preset_id": 12
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/firewall/preset-subscriptions', [
'owner_id' => 1204,
'owner_type' => 'company',
'preset_id' => 12,
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/firewall/preset-subscriptions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
owner_id: 1204,
owner_type: 'company',
preset_id: 12,
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.post(
"https://manage.corefinity.com/api/firewall/preset-subscriptions",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"owner_id": 1204,
"owner_type": "company",
"preset_id": 12,
},
)
data = res.json() if res.content else None{
"change_id": 5312,
"subscription": {
"added_by": {
"name": "Eleanor Finch",
"on_behalf_of": null,
"support": false
},
"created_at": "2026-11-06T09:16:40Z",
"editable": true,
"id": 311,
"layer": "company",
"owner": {
"id": 1204,
"name": "Harbour & Finch",
"type": "company"
},
"preset": {
"description": "The addresses Bitbucket Pipelines builds connect from.",
"id": 12,
"name": "Bitbucket Pipelines",
"ranges_count": 2,
"slug": "bitbucket-pipelines"
}
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "firewall_preset_present",
"field": "preset_id",
"message": "That preset is already attached here.",
"reason": "firewall_preset_present"
}{
"code": "firewall_throttled",
"field": null,
"message": "Too many firewall changes. Wait a minute and try again.",
"reason": "firewall_throttled"
}Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.