Create a new group Run in API Explorer

POST /v2/orgs/{org_name}/groups

Create a new group within an organization.

Path parameters

  • org_name string Required

    Name of the organization (namespace).

application/json

Body

  • name string Required
  • description string

Responses

  • 201 application/json

    Group created successfully

    Hide response attributes Show response attributes object
    • id number

      Group ID

    • uuid string

      UUID for the group

    • name string

      Name of the group

    • description string

      Description of the group

    • member_count number

      Member count of the group

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
  • 401 application/json

    Authentication failed

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
POST /v2/orgs/{org_name}/groups
curl \
 --request POST 'https://hub.docker.com/v2/orgs/myorganization/groups' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","description":"string"}'
Request examples
{
  "name": "string",
  "description": "string"
}
Response examples (201)
{
  "id": 10,
  "uuid": "string",
  "name": "mygroup",
  "description": "Groups description",
  "member_count": 10
}
Response examples (400)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (401)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (403)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}