Creating a User
POST /v2/users/
Request
Route
POST /v2/users
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-896216bb-a73f-48c1-9824-9c796ad36b7c
|
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).
|
|
|
|
{
"guid": "guid-896216bb-a73f-48c1-9824-9c796ad36b7c"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-896216bb-a73f-48c1-9824-9c796ad36b7c"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ5IiwiZW1haWwiOiJlbWFpbC0yM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI5fQ.o4cVagrvKgBn32bODacWKYPVPa6fVOLsXVciRgrW2q8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "guid-896216bb-a73f-48c1-9824-9c796ad36b7c",
"url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c",
"created_at": "2015-10-15T23:52:09Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/spaces",
"organizations_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/organizations",
"managed_organizations_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/audited_organizations",
"managed_spaces_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/managed_spaces",
"audited_spaces_url": "/v2/users/guid-896216bb-a73f-48c1-9824-9c796ad36b7c/audited_spaces"
}
}
Headers