CorefinityCorefinityDocs
Open the Control PanelControl Panel
Team · 3 of 17

Get your company's settings

Answers your own company with its Slack connection, its alert preferences and the Slack channel each kind of notification goes to. PUT /company changes the settings and answers the same shape.

GET/api/company/details

Returns

200 The company and its settings.

Fields of the 200 answer
dataobjectRequired

Your company and its settings. Ids are numbers here, unlike in GET /company.

Fields
addressstring or nullRequired
can_changebooleanRequired

Whether you may change the settings.

countrystring or nullRequired
idintegerRequired

At least 1.

namestringRequired
phonestring or nullRequired
settingsobjectRequired
Fields
alerts_notificationsbooleanRequired
deployment_started_notificationsbooleanRequired
slack_channelsobjectRequired

The Slack channel each kind of notification goes to, as #name, or null for none. A null deployment_started uses the deployments channel.

Fields
alertsstring or nullRequired
deployment_startedstring or nullRequired
deploymentsstring or nullRequired
maintenance_windowsstring or nullRequired
ticketsstring or nullRequired
slackobjectRequired
Fields
connectedbooleanRequired

Whether your company has connected Slack. Slack is connected in the Control Panel.

deliveryarray of objectsRequired

The state of recent notification deliveries to Slack, one item for each destination. Empty when there is nothing to report.

Fields of each item
actionstring or nullRequired

What to do, in plain words, when state is needs_attention. Null otherwise.

attemptsintegerRequired

At least 1.

checked_atstringRequired

When the last delivery was tried, in UTC, written with +00:00. Format: date-time.

destination_idstringRequired

An opaque id for the destination, 64 hexadecimal characters.

driverstringRequired

How the notification is sent, such as slack.

errorstring or nullRequired

Slack's error code for the last delivery, such as channel_not_found. Null after a delivery that worked.

last_delivered_atstring or nullRequired

When a notification last arrived. Null when none has. Format: date-time.

statestringRequired

healthy, retrying after a delivery that will be tried again, or needs_attention when deliveries have stopped.

healthyretryingneeds_attention
workspacestring or nullRequired

The connected workspace's name. Null while Slack is not connected.

typestringRequired
agencyclient

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/company/details \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "data": {
    "address": "14 Quay Street, Anytown, AB1 2CD",
    "can_change": true,
    "country": "GB",
    "id": 1204,
    "name": "Harbour & Finch",
    "phone": "+44 20 7946 0142",
    "settings": {
      "alerts_notifications": false,
      "deployment_started_notifications": true,
      "slack_channels": {
        "alerts": "#alerts",
        "deployment_started": null,
        "deployments": "#deployments",
        "maintenance_windows": null,
        "tickets": null
      }
    },
    "slack": {
      "connected": true,
      "delivery": [],
      "workspace": "harbourandfinch"
    },
    "type": "client"
  }
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT