Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

PUT /v2/organizations/:guid/users/:user_guid

Request

Route

PUT /v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/users/uaa-id-73

Parameters

Name Description Valid Values Example Values
guid The guid of the Organization
user_guid The guid of the user

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/users/uaa-id-73" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc0IiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI0fQ.N0UzQxolKg7pKOvXbSYEBdlVyYgu2Xa4NuN7TmRmrwQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2f0cb90a-8ba3-4134-8f91-a8e1840c59ad",
    "url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad",
    "created_at": "2016-04-16T01:23:44Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-85",
    "billing_enabled": false,
    "quota_definition_guid": "d4451fe2-e476-4056-8511-03195b98cd8d",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/d4451fe2-e476-4056-8511-03195b98cd8d",
    "spaces_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/spaces",
    "domains_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/domains",
    "private_domains_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/private_domains",
    "users_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/users",
    "managers_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/managers",
    "billing_managers_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/billing_managers",
    "auditors_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/auditors",
    "app_events_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/app_events",
    "space_quota_definitions_url": "/v2/organizations/2f0cb90a-8ba3-4134-8f91-a8e1840c59ad/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8f9a0a4f-fb4a-4600-b6b8-3f14d8befe1b
Content-Length: 1298
X-Content-Type-Options: nosniff