Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username (experimental)

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/users

Parameters

Name Description Valid Values Example Values
guid The guid of the Organization
user_guid The guid of the user
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtNjRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MjYwMTUyOX0.MbCJiGTGvFtWS0EJmquXLx-i6eCGcnEHjuSCiWP270Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtNjRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MjYwMTUyOX0.MbCJiGTGvFtWS0EJmquXLx-i6eCGcnEHjuSCiWP270Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6ed0a12c-7361-4bc6-9507-8aa3616f55bd",
    "url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd",
    "created_at": "2015-09-11T18:38:49Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-274",
    "billing_enabled": false,
    "quota_definition_guid": "024c742c-aa35-4c6b-89e0-9d2579ebd9b0",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/024c742c-aa35-4c6b-89e0-9d2579ebd9b0",
    "spaces_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/spaces",
    "domains_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/domains",
    "private_domains_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/private_domains",
    "users_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/users",
    "managers_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/managers",
    "billing_managers_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/billing_managers",
    "auditors_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/auditors",
    "app_events_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/app_events",
    "space_quota_definitions_url": "/v2/organizations/6ed0a12c-7361-4bc6-9507-8aa3616f55bd/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: fc6b2457-6644-4b1c-8987-ebbafb8f5885
Content-Length: 1299
X-Content-Type-Options: nosniff