Skip to main content

List Organizations

Retrieves a list of all organizations accessible to your API key, including resource counts and metadata.
GET /v1/organizations

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Maximum items to return (max 100)
offsetinteger0Number of items to skip
searchstring-Filter by organization name (partial match)

Example Request

# List all organizations
curl https://api.docyard.io/v1/organizations \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

# Search for organizations
curl "https://api.docyard.io/v1/organizations?search=bank" \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

# Paginate results
curl "https://api.docyard.io/v1/organizations?limit=10&offset=20" \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

{
  "data": [
    {
      "id": "org_01HQ3K9B2...",
      "name": "Bank of America",
      "slug": "bank-of-america",
      "metadata": {
        "industry": "financial-services"
      },
      "createdAt": "2024-03-01T12:00:00.000Z",
      "updatedAt": "2024-03-01T12:00:00.000Z",
      "_count": {
        "docks": 3,
        "parties": 12,
        "machineClients": 2
      }
    },
    {
      "id": "org_01HQ3L9C3...",
      "name": "Metro Health System",
      "slug": "metro-health-system",
      "metadata": {
        "industry": "healthcare"
      },
      "createdAt": "2024-02-15T09:30:00.000Z",
      "updatedAt": "2024-02-20T14:22:00.000Z",
      "_count": {
        "docks": 5,
        "parties": 45,
        "machineClients": 3
      }
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "pageSize": 20,
    "hasMore": false
  }
}

Response Fields

FieldTypeDescription
dataarrayList of organization objects
data[].idstringOrganization identifier
data[].namestringOrganization display name
data[].slugstringURL-friendly identifier
data[].metadataobjectCustom attributes
data[]._countobjectResource counts (docks, parties, machineClients)
meta.totalintegerTotal organizations matching query
meta.pageintegerCurrent page number
meta.pageSizeintegerItems per page
meta.hasMorebooleanWhether more results exist

Error Handling

StatusCondition
401Missing or invalid API key

Use Cases

Dashboard View: Display all organizations with resource summaries for navigation. Search: Find organizations by partial name matching for quick access. Resource Monitoring: Track organization growth by monitoring _count fields over time.