Bulk create invites Run in API Explorer

POST /v2/invites/bulk

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

Headers

  • X-Analytics-Client-Feature string

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

application/json

Body Required

  • org string Required

    organization name

  • team string

    team name

  • role string

    role for invitees

  • invitees array[string] Required

    list of invitees emails or Docker Ids

  • dry_run boolean

    Optional, run through validation but don't actually change data.

Responses

  • 202 application/json

    Accepted

    Hide response attribute Show response attribute object
    • invitees object
      Hide invitees attribute Show invitees attribute object
      • invitees array[object]

        A list of invitees

        Hide invitees attributes Show invitees attributes object
        • invitee string

          invitee email or Docker ID

        • status string

          status of the invite or validation error

        • invite object
          Hide invite attributes Show invite attributes object
          • id string

            uuid representing the invite id

          • inviter_username string
          • invitee string

            can either be a dockerID for registred users or an email for non-registred users

          • org string

            name of the org to join

          • team string

            name of the team (user group) to join

          • created_at string
  • 400 application/json

    Bad Request

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

    Conflict

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
POST /v2/invites/bulk
curl \
 --request POST 'https://hub.docker.com/v2/invites/bulk' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "X-Analytics-Client-Feature: string" \
 --data '{"org":"docker","team":"owners","role":"member","invitees":["invitee1DockerId","invitee2@docker.com","invitee3@docker.com"],"dry_run":true}'
Request examples
# Headers
X-Analytics-Client-Feature: string

# Payload
{
  "org": "docker",
  "team": "owners",
  "role": "member",
  "invitees": [
    "invitee1DockerId",
    "invitee2@docker.com",
    "invitee3@docker.com"
  ],
  "dry_run": true
}
Response examples (202)
{
  "invitees": {
    "invitees": [
      {
        "invite": {
          "id": "e36eca69-4cc8-4f17-9845-ae8c2b832691",
          "org": "docker",
          "team": "owners",
          "invitee": "invitee@docker.com",
          "created_at": "2021-10-28T18:30:19.520861Z",
          "inviter_username": "moby"
        },
        "status": "invited",
        "invitee": "invitee@docker.com"
      },
      {
        "status": "existing_org_member",
        "invitee": "invitee2@docker.com"
      },
      {
        "status": "invalid_email_or_docker_id",
        "invitee": "invitee3@docker.com"
      }
    ]
  }
}
Response examples (400)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (409)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}