Organizations
1min read
Get All Organizations
This endpoint retrieves a list of organizations, or orgs, that you belong to. Save the token field to be used in your X-Org-Token header in subsequent calls in querying for assets, findings, pentests and events that belong to that organization.
HTTP Request
GET https://api.us.cobalt.io/orgs
URL Parameters
| Parameter | Default | Description |
|---|---|---|
cursor | N/A | Used for pagination. Example: https://api.us.cobalt.io/orgs?cursor=a1b2c3d4 |
limit | 10 | If specified, returns only a specified amount of organizations. Example: https://api.us.cobalt.io/orgs?limit=5 |
Response Fields
| Field | Description |
|---|---|
id | A unique ID representing the organization. Starts with or_ |
name | The name of the organization |
token | The organization token you’ll need in subsequent calls |
links.ui.url | A link to redirect an authorized user to this organization in the Cobalt web application |
curl -X GET "https://api.us.cobalt.io/orgs" \
-H "Accept: application/vnd.cobalt.v2+json" \
-H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN"
The above command returns JSON structured like this:
{
"data": [
{
"resource": {
"id": "or_Uevoq7MyoYsPT9NPc3conL",
"name": "Acme Corp.",
"token": "e9d6da*****************************0e8ad"
},
"links": {
"ui": {
"url": "https://api.us.cobalt.io/links/eyJ0eXBlIjoic29tZXRoaW5nIiwib3JnU2x1ZyI6ImNvYmFsdCIsInBlbnRlc3RUYWciOiJz="
}
}
},
{
"resource": {
"id": "or_SnUYXDBYd2qbaDSuNRNa5q",
"name": "Lorem Corp.",
"token": "f1d6da*****************************0e8ad"
},
"links": {
"ui": {
"url": "https://api.us.cobalt.io/links/eyJ0eXBlIjoic29tZXRoaW5nIiwib3JnU2x1ZyI6ImNvYmFsdCIsInBlbnRlc3RUYWciOiJz="
}
}
}
],
"pagination": {
"next_page": "/orgs?cursor=a1b2c3d4",
"prev_page": "/orgs?cursor=4d3c2b1a"
}
:::info
Remember - Save the token attribute from the response body. You will need it in subsequent calls as the value of the X-Org-Token header.
:::
