Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

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

Request

Route

PUT /v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/users/uaa-id-42

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/users/uaa-id-42" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTgwfQ.TUiuPMBQWYBonpDmqhQH54sg0sI1mn1mSWZU_5QPygs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187",
    "url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187",
    "created_at": "2015-05-21T01:03:00Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-211",
    "billing_enabled": false,
    "quota_definition_guid": "7a9326aa-5c3d-4faf-b54d-ec492933f88f",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/7a9326aa-5c3d-4faf-b54d-ec492933f88f",
    "spaces_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/spaces",
    "domains_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/domains",
    "private_domains_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/private_domains",
    "users_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/users",
    "managers_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/managers",
    "billing_managers_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/billing_managers",
    "auditors_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/auditors",
    "app_events_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/app_events",
    "space_quota_definitions_url": "/v2/organizations/c6ec3ead-a7e6-4d4f-b4ae-20950ebd1187/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2d59728e-2e56-464f-a90b-0d4faed8491e
Content-Length: 1299
X-Content-Type-Options: nosniff