Bulk create invites
/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
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Request
application/json
Type:
object
dry_run
Type:
boolean
All schema constraints and annotations
{
"description": "Optional, run through validation but don't actually change data.",
"example": true,
"type": "boolean"
}invitees
· required
Type:
array
Array item
Type:
string
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
Type:
string
All schema constraints and annotations
{
"description": "organization name",
"example": "docker",
"type": "string"
}role
Type:
string
All schema constraints and annotations
{
"description": "role for invitees",
"example": "member",
"type": "string"
}team
Type:
string
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
application/json
Schema:
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
application/json
Schema:
error
error
{
"errinfo": null,
"message": "bad request"
}Response
409
application/json
Schema:
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"
]
}