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.eyJ1c2VyX2lkIjoidWFhLWlkLTU1IiwiZW1haWwiOiJlbWFpbC0yNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMwfQ.Bs7QT9eejzr10qFnSOnuIcEY-kvr9ZvhduXjmyWAVAw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-54/organizations/ba0e23f1-8684-4059-ae69-2f6eb93cd495

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-54/organizations/ba0e23f1-8684-4059-ae69-2f6eb93cd495" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU1IiwiZW1haWwiOiJlbWFpbC0yNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMwfQ.Bs7QT9eejzr10qFnSOnuIcEY-kvr9ZvhduXjmyWAVAw" \
	-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: ff5a91ca-9cfc-40dc-849a-cc9ae54b7078
Content-Length: 841
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-54",
    "url": "/v2/users/uaa-id-54",
    "created_at": "2015-01-20T01:52:09+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "9ac31302-2ae9-4453-be48-8e8ae49ced6a",
    "default_space_url": "/v2/spaces/9ac31302-2ae9-4453-be48-8e8ae49ced6a",
    "spaces_url": "/v2/users/uaa-id-54/spaces",
    "organizations_url": "/v2/users/uaa-id-54/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-54/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-54/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-54/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-54/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-54/audited_spaces"
  }
}