Creating a User
POST /v2/users/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-316c2fc6-24ea-4e60-9658-148ee1db7471
|
default_space_guid
|
The guid of the default space for apps created by this user.
|
|
|
|
admin
|
Whether the user is an admin (Use UAA instead).
|
|
|
|
Request
Headers
Route
POST /v2/users
Body
{
"guid": "guid-316c2fc6-24ea-4e60-9658-148ee1db7471"
}
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-316c2fc6-24ea-4e60-9658-148ee1db7471"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTE5fQ.kBtMuOayCBs1WkfSc4H7S13gBom34g04vtzNPqyttSQ" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "guid-316c2fc6-24ea-4e60-9658-148ee1db7471",
"url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471",
"created_at": "2015-02-12T01:41:59Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/spaces",
"organizations_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/organizations",
"managed_organizations_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/audited_organizations",
"managed_spaces_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/managed_spaces",
"audited_spaces_url": "/v2/users/guid-316c2fc6-24ea-4e60-9658-148ee1db7471/audited_spaces"
}
}