Docker Hub invites API

The invites endpoints allow you to manage invites for users to join your Docker organization. For more information, see [Invite members](https://docs.docker.com/admin/organization/manage/members/#invite-members).

OpenAPI Specification

docker-hub-invites-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docker HUB access-tokens invites API
  version: 2-beta
  x-logo:
    url: https://docs.docker.com/assets/images/logo-docker-main.png
    href: /reference
  description: 'Docker Hub is a service provided by Docker for finding and sharing container images with your team.


    It is the world''s largest library and community for container images.


    In addition to the [Docker Hub UI](https://docs.docker.com/docker-hub/) and [Docker Hub CLI tool](https://github.com/docker/hub-tool#readme) (currently experimental), Docker provides an API that allows you to interact with Docker Hub.


    Browse through the Docker Hub API documentation to explore the supported endpoints.

    '
servers:
- description: Docker HUB API
  x-audience: public
  url: https://hub.docker.com
tags:
- name: invites
  x-displayName: Invites
  x-audience: public
  description: 'The invites endpoints allow you to manage invites for users to join your Docker organization.


    For more information, see [Invite members](https://docs.docker.com/admin/organization/manage/members/#invite-members).

    '
paths:
  /v2/orgs/{org_name}/invites:
    x-audience: public
    parameters:
    - $ref: '#/components/parameters/org_name'
    get:
      summary: List org invites
      description: 'Return all pending invites for a given org, only team owners can call this endpoint


        <span class="oat"></span>

        '
      tags:
      - invites
      security:
      - bearerAuth: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/invite'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
  /v2/invites/{id}:
    x-audience: public
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    delete:
      summary: Cancel an invite
      description: 'Mark the invite as cancelled so it doesn''t show up on the list of pending invites


        <span class="oat"></span>

        '
      tags:
      - invites
      security:
      - bearerAuth: []
      responses:
        '204':
          description: ''
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
  /v2/invites/{id}/resend:
    x-audience: public
    parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
    patch:
      summary: Resend an invite
      description: 'Resend a pending invite to the user, any org owner can resend an invite


        <span class="oat"></span>

        '
      tags:
      - invites
      security:
      - bearerAuth: []
      responses:
        '204':
          description: ''
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
  /v2/invites/bulk:
    x-audience: public
    parameters:
    - $ref: '#/components/parameters/bulk_invite'
    post:
      summary: Bulk create invites
      description: 'Create multiple invites by emails or DockerIDs. Only a team owner can create invites.


        <span class="oat"></span>

        '
      tags:
      - invites
      requestBody:
        $ref: '#/components/requestBodies/bulk_invite_request'
      security:
      - bearerAuth: []
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  invitees:
                    $ref: '#/components/schemas/bulk_invite'
        '400':
          $ref: '#/components/responses/bad_request'
        '409':
          $ref: '#/components/responses/conflict'
components:
  responses:
    conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    bad_request:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    not_found:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    error:
      type: object
      properties:
        errinfo:
          type: object
          items:
            type: string
        detail:
          type: string
        message:
          type: string
    invite:
      type: object
      properties:
        id:
          type: string
          description: uuid representing the invite id
          example: e36eca69-4cc8-4f17-9845-ae8c2b832691
        inviter_username:
          type: string
          example: moby
        invitee:
          type: string
          description: can either be a dockerID for registered users or an email for non-registered users
          example: invitee@docker.com
        org:
          type: string
          description: name of the org to join
          example: docker
        team:
          type: string
          description: name of the team (user group) to join
          example: owners
        created_at:
          type: string
          example: '2021-10-28T18:30:19.520861Z'
    bulk_invite:
      type: object
      properties:
        invitees:
          type: array
          description: A list of invitees
          items:
            type: object
            properties:
              invitee:
                type: string
                description: invitee email or Docker ID
              status:
                type: string
                description: status of the invite or validation error
              invite:
                description: Invite data if successfully invited
                $ref: '#/components/schemas/invite'
      example:
        invitees:
        - invitee: invitee@docker.com
          status: invited
          invite:
            id: e36eca69-4cc8-4f17-9845-ae8c2b832691
            inviter_username: moby
            invitee: invitee@docker.com
            org: docker
            team: owners
            created_at: '2021-10-28T18:30:19.520861Z'
        - invitee: invitee2@docker.com
          status: existing_org_member
        - invitee: invitee3@docker.com
          status: invalid_email_or_docker_id
  requestBodies:
    bulk_invite_request:
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
            - org
            - invitees
            properties:
              org:
                type: string
                description: organization name
                example: docker
              team:
                type: string
                description: team name
                example: owners
              role:
                type: string
                description: role for invitees
                example: member
              invitees:
                type: array
                description: list of invitees emails or Docker Ids
                items:
                  type: string
                  description: invitee email or Docker ID
                example:
                - invitee1DockerId
                - invitee2@docker.com
                - invitee3@docker.com
              dry_run:
                type: boolean
                description: Optional, run through validation but don't actually change data.
                example: true
  parameters:
    bulk_invite:
      in: header
      name: X-Analytics-Client-Feature
      description: Optional string that indicates the feature used to submit the bulk invites (e.g.'file', 'web')
      schema:
        type: string
    org_name:
      in: path
      name: org_name
      description: Name of the organization (namespace).
      schema:
        type: string
      example: myorganization
      required: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    bearerSCIMAuth:
      type: http
      scheme: bearer
x-tagGroups:
- name: General
  tags:
  - changelog
  - resources
  - rate-limiting
  - authentication
- name: API
  tags:
  - authentication-api
  - access-tokens
  - images
  - audit-logs
  - org-settings
  - repositories
  - scim
  - orgs
  - org-access-tokens
  - groups
  - invites