Share feedback
Answers are generated based on the documentation.

Bulk create invites

POST/v2/invites/bulk

Create multiple invites by emails or DockerIDs. Only a team owner can create invites.

This operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.

Connection and access

API connection and authentication guidance

https://hub.docker.com — Docker HUB API

Use one of these alternatives. Requirements within an alternative apply together.

  • bearerAuth

Parameters

X-Analytics-Client-Feature header

Optional string that indicates the feature used to submit the bulk invites (e.g.'file', 'web')

型: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Request

application/json

型: object

dry_run

型: boolean

Optional, run through validation but don't actually change data.
All schema constraints and annotations
{
  "description": "Optional, run through validation but don't actually change data.",
  "example": true,
  "type": "boolean"
}
invitees · required

型: array

list of invitees emails or Docker Ids
Array item

型: string

invitee email or Docker ID
All schema constraints and annotations
{
  "description": "invitee email or Docker ID",
  "type": "string"
}
All schema constraints and annotations
{
  "description": "list of invitees emails or Docker Ids",
  "example": [
    "invitee1DockerId",
    "invitee2@docker.com",
    "invitee3@docker.com"
  ],
  "items": {
    "description": "invitee email or Docker ID",
    "type": "string"
  },
  "type": "array"
}
org · required

型: string

organization name
All schema constraints and annotations
{
  "description": "organization name",
  "example": "docker",
  "type": "string"
}
role

型: string

role for invitees
All schema constraints and annotations
{
  "description": "role for invitees",
  "example": "member",
  "type": "string"
}
team

型: string

team name
All schema constraints and annotations
{
  "description": "team name",
  "example": "owners",
  "type": "string"
}
All schema constraints and annotations
{
  "examples": [
    {
      "dry_run": true,
      "invitees": [
        "invitee1DockerId",
        "invitee2@docker.com",
        "invitee3@docker.com"
      ],
      "org": "docker",
      "role": "member",
      "team": "owners"
    }
  ],
  "properties": {
    "dry_run": {
      "description": "Optional, run through validation but don't actually change data.",
      "example": true,
      "type": "boolean"
    },
    "invitees": {
      "description": "list of invitees emails or Docker Ids",
      "example": [
        "invitee1DockerId",
        "invitee2@docker.com",
        "invitee3@docker.com"
      ],
      "items": {
        "description": "invitee email or Docker ID",
        "type": "string"
      },
      "type": "array"
    },
    "org": {
      "description": "organization name",
      "example": "docker",
      "type": "string"
    },
    "role": {
      "description": "role for invitees",
      "example": "member",
      "type": "string"
    },
    "team": {
      "description": "team name",
      "example": "owners",
      "type": "string"
    }
  },
  "required": [
    "org",
    "invitees"
  ],
  "type": "object"
}

Schema example

{
  "dry_run": true,
  "invitees": [
    "invitee1DockerId",
    "invitee2@docker.com",
    "invitee3@docker.com"
  ],
  "org": "docker",
  "role": "member",
  "team": "owners"
}

Response 202

Accepted

application/json

スキーマ: bulk_invite

Schema example

{
  "invitees": [
    {
      "invite": {
        "created_at": "2021-10-28T18:30:19.520861Z",
        "id": "e36eca69-4cc8-4f17-9845-ae8c2b832691",
        "invitee": "invitee@docker.com",
        "inviter_username": "moby",
        "org": "docker",
        "team": "owners"
      },
      "invitee": "invitee@docker.com",
      "status": "invited"
    },
    {
      "invitee": "invitee2@docker.com",
      "status": "existing_org_member"
    },
    {
      "invitee": "invitee3@docker.com",
      "status": "invalid_email_or_docker_id"
    }
  ]
}

Response 400

Bad Request

application/json

スキーマ: error

error

{
  "errinfo": null,
  "message": "bad request"
}

Response 409

Conflict

application/json

スキーマ: error

error

{
  "errinfo": null,
  "message": "conflict"
}

Referenced schemas

#/components/schemas/bulk_invite

Complete operation contract
{
  "description": "Create multiple invites by emails or DockerIDs. Only a team owner can create invites.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
  "operationId": "postV2InvitesBulk",
  "requestBody": {
    "$ref": "#/components/requestBodies/bulk_invite_request"
  },
  "responses": {
    "202": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/bulk_invite"
          }
        }
      },
      "description": "Accepted"
    },
    "400": {
      "$ref": "#/components/responses/bad_request"
    },
    "409": {
      "$ref": "#/components/responses/conflict"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "Bulk create invites",
  "tags": [
    "invites"
  ]
}