Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/users

Parameters

Name Description Valid Values Example Values
guid The guid of the Organization

Body

Name Description Default Valid Values Example Values
username The user's name
  • user@example.com
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NCIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDZ9.yY1NtSWUD4SUTW8K1nlP4NO0SQ_x36b-2g24-3XVCIs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NCIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDZ9.yY1NtSWUD4SUTW8K1nlP4NO0SQ_x36b-2g24-3XVCIs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11bbf350-f9a9-413a-9589-4bff76c04252",
    "url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252",
    "created_at": "2016-03-14T22:30:46Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2185",
    "billing_enabled": false,
    "quota_definition_guid": "0580d7a0-04dd-4575-99cb-b8dc8fd2e192",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/0580d7a0-04dd-4575-99cb-b8dc8fd2e192",
    "spaces_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/spaces",
    "domains_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/domains",
    "private_domains_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/private_domains",
    "users_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/users",
    "managers_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/managers",
    "billing_managers_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/billing_managers",
    "auditors_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/auditors",
    "app_events_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/app_events",
    "space_quota_definitions_url": "/v2/organizations/11bbf350-f9a9-413a-9589-4bff76c04252/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1300
X-Content-Type-Options: nosniff