Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

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

Request

Route

PUT /v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/users/uaa-id-111

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/users/uaa-id-111" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMiIsImVtYWlsIjoiZW1haWwtNjFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTM2MjI5OX0.Gf_K6KdXSxZYTdqgs_QndHl2uAja9hi8L9_VXLF8MkA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f53c98d5-b395-45f1-a07a-ca0f165d1deb",
    "url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb",
    "created_at": "2015-10-13T17:31:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-233",
    "billing_enabled": false,
    "quota_definition_guid": "399fb1bd-1e5a-4d91-bb40-454056bbe8f6",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/399fb1bd-1e5a-4d91-bb40-454056bbe8f6",
    "spaces_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/spaces",
    "domains_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/domains",
    "private_domains_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/private_domains",
    "users_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/users",
    "managers_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/managers",
    "billing_managers_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/billing_managers",
    "auditors_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/auditors",
    "app_events_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/app_events",
    "space_quota_definitions_url": "/v2/organizations/f53c98d5-b395-45f1-a07a-ca0f165d1deb/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ed4a7762-e683-4b06-b4b7-5adadbcef859
Content-Length: 1299
X-Content-Type-Options: nosniff