Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MiIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4Mzl9.oFAKPp_oEKvxIGd0vzJY--OtHZhfuipI2TtXEvi3u9U
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MiIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4Mzl9.oFAKPp_oEKvxIGd0vzJY--OtHZhfuipI2TtXEvi3u9U" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e040e4e8-d20c-487e-956a-32861c36f9a3",
    "url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3",
    "created_at": "2015-11-03T00:53:59Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-849",
    "billing_enabled": false,
    "quota_definition_guid": "b0ee98f5-9193-42c9-9e28-ea0f784b65a3",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/b0ee98f5-9193-42c9-9e28-ea0f784b65a3",
    "spaces_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/spaces",
    "domains_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/domains",
    "private_domains_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/private_domains",
    "users_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/users",
    "managers_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/managers",
    "billing_managers_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/billing_managers",
    "auditors_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/auditors",
    "app_events_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/app_events",
    "space_quota_definitions_url": "/v2/organizations/e040e4e8-d20c-487e-956a-32861c36f9a3/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 39931d30-f38b-4674-8f1c-b21ec46c0fe1
Content-Length: 1299
X-Content-Type-Options: nosniff