Skip to main content
GET
/
accounts
List Accounts
curl --request GET \
  --url https://api.stackone.com/accounts \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.stackone.com/accounts"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.stackone.com/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stackone.com/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.stackone.com/accounts"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.stackone.com/accounts")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.stackone.com/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "provider": "<string>",
    "origin_owner_id": "<string>",
    "origin_owner_name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "provider_name": "<string>",
    "categories": [
      "hris",
      "ats"
    ],
    "status_reasons": [
      {
        "timestamp": "2023-11-07T05:31:56Z",
        "code": "<string>",
        "description": "<string>"
      }
    ],
    "origin_username": "<string>",
    "credentials": {},
    "setup_information": {},
    "label": "<string>",
    "type": [
      "PRODUCTION",
      "TEST"
    ],
    "shared": true
  }
]
{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}
{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}
{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

page
number | null

The page number of the results to fetch

page_size
number | null
default:25

The number of results per page

provider
string | null

The provider of the results to fetch

origin_owner_id
string | null

The origin owner identifier of the results to fetch

origin_owner_ids
string[]

The origin owner identifiers of the results to fetch (supports multiple IDs)

providers
string[]

The providers list of the results to fetch

account_ids
string[]

The providers list of the results to fetch

status
string[]

The status of the results to fetch

Response

The list of accounts was retrieved.

id
string
required
provider
string
required
status
enum<string>
required
Available options:
active,
inactive,
suspended,
archived,
expired,
error
origin_owner_id
string
required
origin_owner_name
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
provider_name
string | null
categories
string[] | null

The categories this provider belongs to (e.g., hris, ats, crm)

Example:
["hris", "ats"]
status_reasons
object[] | null
origin_username
string | null
credentials
object | null
setup_information
object | null
label
string | null
type
enum<string> | null

The account type

Available options:
production,
test,
unmapped_value,
null
Example:
["PRODUCTION", "TEST"]
shared
boolean | null