Share feedback
Answers are generated based on the documentation.

Create user

POST/v2/scim/2.0/Users
Creates a user. If the user already exists by email, they are assigned to the organization on the "company" team.

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.

  • scimToken

Parameters

No parameters are declared.

Request and responses

Request

application/scim+json

Type: object

name

Schema: scim_user_name

schemas · required

Schema: scim_user_schemas

userName · required

Schema: scim_user_username

All schema constraints and annotations
{
  "examples": [
    {
      "name": {
        "familyName": "Snow",
        "givenName": "Jon"
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "userName": "jon.snow@docker.com"
    }
  ],
  "properties": {
    "name": {
      "$ref": "#/components/schemas/scim_user_name"
    },
    "schemas": {
      "$ref": "#/components/schemas/scim_user_schemas"
    },
    "userName": {
      "$ref": "#/components/schemas/scim_user_username"
    }
  },
  "required": [
    "schemas",
    "userName"
  ],
  "type": "object"
}

Schema example

{
  "name": {
    "familyName": "Snow",
    "givenName": "Jon"
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "jon.snow@docker.com"
}

Response 201

application/scim+json

Schema: scim_user

Schema example

{
  "active": true,
  "displayName": "jonsnow",
  "emails": [
    {
      "display": "jon.snow@docker.com",
      "primary": true,
      "value": "jon.snow@docker.com"
    }
  ],
  "groups": [
    {
      "display": "nightswatch",
      "value": "nightswatch"
    }
  ],
  "id": "d80f7c79-7730-49d8-9a41-7c42fb622d9c",
  "meta": {
    "created": "2022-05-20T00:54:18Z",
    "lastModified": "2022-05-20T00:54:18Z",
    "location": "https://hub.docker.com/v2/scim/2.0/Users/d80f7c79-7730-49d8-9a41-7c42fb622d9c",
    "resourceType": "User"
  },
  "name": {
    "familyName": "Snow",
    "givenName": "Jon"
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "jon.snow@docker.com"
}

Response 400

Bad Request

application/scim+json

All constraints apply

Schema: scim_error

scimType

Type: string

Some types of errors will return this per the specification.
All schema constraints and annotations
{
  "description": "Some types of errors will return this per the specification.",
  "type": "string"
}
status
All schema constraints and annotations
{
  "example": "400"
}
All schema constraints and annotations
{
  "properties": {
    "scimType": {
      "description": "Some types of errors will return this per the specification.",
      "type": "string"
    },
    "status": {
      "example": "400"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "scimType": {
          "description": "Some types of errors will return this per the specification.",
          "type": "string"
        },
        "status": {
          "example": "400"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "400"
}

Response 401

Unauthorized

application/scim+json

All constraints apply

Schema: scim_error

status
All schema constraints and annotations
{
  "example": "401"
}
All schema constraints and annotations
{
  "properties": {
    "status": {
      "example": "401"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "401"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "401"
}

Response 403

Forbidden

application/scim+json

All constraints apply

Schema: scim_error

status
All schema constraints and annotations
{
  "example": "403"
}
All schema constraints and annotations
{
  "properties": {
    "status": {
      "example": "403"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "403"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "403"
}

Response 404

Not Found

application/scim+json

All constraints apply

Schema: scim_error

status
All schema constraints and annotations
{
  "example": "404"
}
All schema constraints and annotations
{
  "properties": {
    "status": {
      "example": "404"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "404"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "404"
}

Response 409

Conflict

application/scim+json

All constraints apply

Schema: scim_error

status
All schema constraints and annotations
{
  "example": "409"
}
All schema constraints and annotations
{
  "properties": {
    "status": {
      "example": "409"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "409"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "409"
}

Response 500

Internal Error

application/scim+json

All constraints apply

Schema: scim_error

status
All schema constraints and annotations
{
  "example": "500"
}
All schema constraints and annotations
{
  "properties": {
    "status": {
      "example": "500"
    }
  }
}
All schema constraints and annotations
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "500"
        }
      }
    }
  ]
}

error

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "500"
}

Referenced schemas

Complete operation contract
{
  "description": "Creates a user. If the user already exists by email, they are assigned to the organization on the \"company\" team.\n",
  "operationId": "postV2Scim20Users",
  "requestBody": {
    "$ref": "#/components/requestBodies/scim_create_user_request"
  },
  "responses": {
    "201": {
      "$ref": "#/components/responses/scim_create_user_resp"
    },
    "400": {
      "$ref": "#/components/responses/scim_bad_request"
    },
    "401": {
      "$ref": "#/components/responses/scim_unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/scim_forbidden"
    },
    "404": {
      "$ref": "#/components/responses/scim_not_found"
    },
    "409": {
      "$ref": "#/components/responses/scim_conflict"
    },
    "500": {
      "$ref": "#/components/responses/scim_error"
    }
  },
  "security": [
    {
      "scimToken": []
    }
  ],
  "summary": "Create user",
  "tags": [
    "scim"
  ]
}