Home
Version 3
Users API

Users API

Associate Organization with the User

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

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcwIiwiZW1haWwiOiJlbWFpbC01MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMzfQ.kGnzYAroOSZ9_0_wHnhvMRWnAE7IiNGN0uC8NMMhSNs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-69/organizations/e5ba5fd3-93fb-454a-90c2-5a3548046817

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-69/organizations/e5ba5fd3-93fb-454a-90c2-5a3548046817" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcwIiwiZW1haWwiOiJlbWFpbC01MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMzfQ.kGnzYAroOSZ9_0_wHnhvMRWnAE7IiNGN0uC8NMMhSNs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 901e4517-2b2e-426b-8f63-cf962651f9eb
Content-Length: 841
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-69",
    "url": "/v2/users/uaa-id-69",
    "created_at": "2014-11-05T01:02:12+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "6201348f-379a-42f9-9503-1bd640b0b1ce",
    "default_space_url": "/v2/spaces/6201348f-379a-42f9-9503-1bd640b0b1ce",
    "spaces_url": "/v2/users/uaa-id-69/spaces",
    "organizations_url": "/v2/users/uaa-id-69/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-69/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-69/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-69/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-69/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-69/audited_spaces"
  }
}