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

Route

PUT /v2/users/uaa-id-53/organizations/38475559-da16-4fc6-b725-21ddeacd7c55

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-53/organizations/38475559-da16-4fc6-b725-21ddeacd7c55" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU0IiwiZW1haWwiOiJlbWFpbC0zMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTIxfQ.5KhgF0Gd387GGQH86BxokqbQDjRUfY4sUQ7wKN1SEos" \
	-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: 151d945c-a0de-47b3-88c4-f517ebfbddb8
Content-Length: 836
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-53",
    "url": "/v2/users/uaa-id-53",
    "created_at": "2015-02-12T01:42:01Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7eb82960-bd1e-4466-873e-2fd9d4014f9a",
    "default_space_url": "/v2/spaces/7eb82960-bd1e-4466-873e-2fd9d4014f9a",
    "spaces_url": "/v2/users/uaa-id-53/spaces",
    "organizations_url": "/v2/users/uaa-id-53/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-53/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-53/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-53/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-53/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-53/audited_spaces"
  }
}