Home
Version 3
Users API

Users API

Associate Organization with the User

PUT /v2/users/:guid/organizations/:organization_guid

Request

Route

PUT /v2/users/uaa-id-203/organizations/e54be826-98bf-46e0-aba6-6be0a7891b6a

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNCIsImVtYWlsIjoiZW1haWwtMTU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTN9.dDNGJNoCp1-Y81n1m_Lj6MdDObkOeImxuw4kk4EZwOM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-203/organizations/e54be826-98bf-46e0-aba6-6be0a7891b6a" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNCIsImVtYWlsIjoiZW1haWwtMTU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTN9.dDNGJNoCp1-Y81n1m_Lj6MdDObkOeImxuw4kk4EZwOM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-203",
    "url": "/v2/users/uaa-id-203",
    "created_at": "2015-06-16T23:40:53Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "83b8451e-d9e6-4b0f-8631-4e15f776de8e",
    "default_space_url": "/v2/spaces/83b8451e-d9e6-4b0f-8631-4e15f776de8e",
    "spaces_url": "/v2/users/uaa-id-203/spaces",
    "organizations_url": "/v2/users/uaa-id-203/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-203/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-203/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-203/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-203/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-203/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b00bc5ac-f023-42fd-bbbf-7c2b17fbbe45
Content-Length: 845
X-Content-Type-Options: nosniff