Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

PUT /v2/organizations/:guid/users/:user_guid

Request

Route

PUT /v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/users/uaa-id-331

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.z__WoG8W82tWIsLRx6I5nq_f8U-GJjriR_TFEV_5e9g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/users/uaa-id-331" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.z__WoG8W82tWIsLRx6I5nq_f8U-GJjriR_TFEV_5e9g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6c9fdef6-40ea-461a-9e69-b589d26d7f6f",
    "url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f",
    "created_at": "2015-10-07T00:35:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2131",
    "billing_enabled": false,
    "quota_definition_guid": "fc65192f-417e-4686-a445-d515b656be0d",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/fc65192f-417e-4686-a445-d515b656be0d",
    "spaces_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/spaces",
    "domains_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/domains",
    "private_domains_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/private_domains",
    "users_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/users",
    "managers_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/managers",
    "billing_managers_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/billing_managers",
    "auditors_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/auditors",
    "app_events_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/app_events",
    "space_quota_definitions_url": "/v2/organizations/6c9fdef6-40ea-461a-9e69-b589d26d7f6f/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 12e782f8-f61b-40c1-b50e-13e718436503
Content-Length: 1300
X-Content-Type-Options: nosniff