Update org member (role) Run in API Explorer

PUT /v2/orgs/{org_name}/members/{username}

Updates the role of a member in the organization. Only users in the "owners" group of the organization can use this endpoint.

Path parameters

  • org_name string Required

    Name of the organization (namespace).

  • username string Required

    Username, identifier for the user (namespace, DockerID).

application/json

Body Required

  • role string Required

    Role of the member

    Values are owner, editor, or member.

Responses

  • 200 application/json

    Member role updated

    Hide response attributes Show response attributes object
    • email string

      User's email address

    • role string

      User's role in the Organization

      Values are Owner, Member, or Invitee.

    • groups array[string]

      Groups (Teams) that the user is member of

    • is_guest boolean

      If the organization has verfied domains, members that have email addresses outside of those domains will be flagged as guests.

    • primary_email string Deprecated

      The user's email primary address.

    • last_logged_in_at string(date-time)

      Last time the user logged in. To access this field, you must have insights visible for your organization. See Insights.

    • last_seen_at string(date-time)

      Last time the user was seen. To access this field, you must have insights visible for your organization. See Insights.

    • last_desktop_version string

      Last desktop version the user used. To access this field, you must have insights visible for your organization. See Insights.

    • id string

      The UUID trimmed

    • company string
    • date_joined string
    • full_name string
    • gravatar_email string
    • gravatar_url string
    • location string
    • profile_url string
    • type string

      Values are User or Org.

    • username string
  • 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
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
PUT /v2/orgs/{org_name}/members/{username}
curl \
 --request PUT 'https://hub.docker.com/v2/orgs/myorganization/members/jonsnow' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"role":"owner"}'
Request examples
{
  "role": "owner"
}
Response examples (200)
{
  "email": "example@docker.com",
  "role": "Owner",
  "groups": [
    "developers",
    "owners"
  ],
  "is_guest": false,
  "primary_email": "example@docker.com",
  "last_logged_in_at": "2021-01-05T21:06:53.506400Z",
  "last_seen_at": "2021-01-05T21:06:53.506400Z",
  "last_desktop_version": "4.29.0",
  "id": "0ab70deb065a43fcacd55d48caa945d8",
  "company": "Docker Inc",
  "date_joined": "2021-01-05T21:06:53.506400Z",
  "full_name": "Jon Snow",
  "gravatar_email": "string",
  "gravatar_url": "string",
  "location": "string",
  "profile_url": "string",
  "type": "User",
  "username": "dockeruser"
}
Response examples (400)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (401)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (403)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (404)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}