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

Route

PUT /v2/users/uaa-id-115/organizations/2fdaa356-02e1-4e9e-8bb3-e97bfa503860

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-115/organizations/2fdaa356-02e1-4e9e-8bb3-e97bfa503860" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNiIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2NX0.c6BdzVWsv_GBY4gHd_IANhq1vUDA4D6TuF7vl9XQ_Ks" \
	-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: 0d64719c-645a-4eef-928f-06965dce3633
Content-Length: 845
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-115",
    "url": "/v2/users/uaa-id-115",
    "created_at": "2015-02-10T01:42:45Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "344505a1-03d4-4009-9bde-c02307ea4a84",
    "default_space_url": "/v2/spaces/344505a1-03d4-4009-9bde-c02307ea4a84",
    "spaces_url": "/v2/users/uaa-id-115/spaces",
    "organizations_url": "/v2/users/uaa-id-115/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-115/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-115/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-115/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-115/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-115/audited_spaces"
  }
}