Documentation Index
Fetch the complete documentation index at: https://docs.serval.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The DockerHub Organization integration covers the operations the sibling DockerHub integration cannot. Personal Access Tokens (PATs) are deliberately scoped by Docker Hub to repository operations only — calls to org/team/group endpoints return403 token issued from personal access token is not allowed. To automate
org membership, teams, and repository permissions you need an
Organization Access Token (OAT).
Key Features
- Look up org members and search by email
- Create, update, and delete teams (groups)
- Add and remove members from teams
- Grant and revoke a team’s access to a repository
Common Use Cases
- Provision/deprovision Docker Hub access during onboarding/offboarding
- Self-service requests that grant a user write access to a specific repo
- Quarterly access reviews — list members and their team memberships
- Bulk apply repo-permission policies across an organization
When to use this vs the DockerHub (PAT) integration
| Need | Integration |
|---|---|
| Audit a repository, list tags, delete tags, update description | DockerHub (PAT) |
| List or search organization members | DockerHub Organization (OAT) |
| Create teams, add members to teams | DockerHub Organization (OAT) |
| Grant or revoke a team’s access to a repository | DockerHub Organization (OAT) |
Prerequisites
Organization Access Token (OAT)
OATs are issued through Docker’s first-party enrollment flows — they
are not the same as Personal Access Tokens, and there is no public
third-party OAuth app registration to mint them. Typical sources:
docker org connectfrom a workstation logged in with an org admin- The Docker Hub partner OAuth pilot (gated by Docker)
- Docker Desktop’s “Connect organization” flow
Setup Instructions
Step 1: Obtain an Organization Access Token
OAT issuance is gated by Docker; the most common path today is the Docker CLI’s org-connect flow. If you already use that flow to enroll Docker Desktop or CI runners against your org, that’s the credential to use here. Otherwise, contact your Docker Hub partner contact.Step 2: Configure the integration in Serval
- Navigate to the Integrations page in Serval.
- Find DockerHub Organization and click Configure.
- Enter your configuration details.
The Docker Hub organization slug — the
{org_name} segment in URLs
like hub.docker.com/u/{org_name} or API paths like /v2/orgs/{org_name}/.The Organization Access Token from Step 1. Serval stores this encrypted
and never exposes it to workflow code. Behind the scenes, the proxy
exchanges the OAT for a short-lived JWT at
POST hub.docker.com/v2/auth/token (with {identifier: organizationName, secret: oat} per Docker Hub’s spec) and uses the resulting JWT as the
Bearer header. The JWT is cached and refreshed automatically; workflow
code never sees either secret.A friendly label to distinguish this connection from others (for
example,
Production, Sandbox Org). Required when you have multiple
DockerHub Organization connections on the same team.- Click Submit to establish the integration.
Integration configured. Serval will run three healthchecks: verifying
the OAT, listing one org member, and listing one team.
API surface
All paths match Docker Hub’s public OpenAPI spec exactly. Trailing slashes matter — none of these paths take one, and Docker Hub returns 404 if you add one.Members
Members
GET /v2/orgs/{org_name}/members— list and search (search,page,page_size,invites,role)PUT /v2/orgs/{org_name}/members/{username}— update role{role: "owner" | "editor" | "member"}DELETE /v2/orgs/{org_name}/members/{username}— remove member from org
Teams (Groups)
Teams (Groups)
GET /v2/orgs/{org_name}/groups— list teamsPOST /v2/orgs/{org_name}/groups— create a team{name, description}GET /v2/orgs/{org_name}/groups/{group_name}— team detailsPATCH /v2/orgs/{org_name}/groups/{group_name}— update name or descriptionDELETE /v2/orgs/{org_name}/groups/{group_name}— delete teamGET /v2/orgs/{org_name}/groups/{group_name}/members— list membersPOST /v2/orgs/{org_name}/groups/{group_name}/members— add{member: "username"}DELETE /v2/orgs/{org_name}/groups/{group_name}/members/{username}— remove member
Invites
Invites
GET /v2/orgs/{org_name}/invites— list pending invites
Repository team-grant operations live on the DockerHub (PAT)
integration, not here. Docker Hub keeps
POST /v2/repositories/{namespace}/{repository}/groups PAT-callable
despite the team semantics. The typical “grant team write access to a
repo” workflow uses both integrations:- Use this integration to resolve the team’s numeric
idviaGET /v2/orgs/{org_name}/groups/{group_name}. - Use the PAT integration to call the grant endpoint with
{ group_id, permission: "write" }.
Best Practices
Additional Resources
Docker Hub API reference
Complete reference for the Hub REST API.
Docker Hub security & tokens
Background on PATs and OATs.
Need help? Contact support@serval.com for assistance with your DockerHub Organization integration.

