Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/users

Parameters

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

Body

Name Description Default Valid Values Example Values
username The user's name
  • user@example.com
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNCIsImVtYWlsIjoiZW1haWwtNjJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTM2MjI5OX0.ged9PRfDdPnno-nrhOwOSzeRbkNrshQSyi-im7gyNxQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNCIsImVtYWlsIjoiZW1haWwtNjJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTM2MjI5OX0.ged9PRfDdPnno-nrhOwOSzeRbkNrshQSyi-im7gyNxQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "811021f0-95f8-43a3-b50d-295788ed1be9",
    "url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9",
    "created_at": "2015-10-13T17:31:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-235",
    "billing_enabled": false,
    "quota_definition_guid": "4ce843cc-40e8-441a-ab32-f8e96eb271b2",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/4ce843cc-40e8-441a-ab32-f8e96eb271b2",
    "spaces_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/spaces",
    "domains_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/domains",
    "private_domains_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/private_domains",
    "users_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/users",
    "managers_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/managers",
    "billing_managers_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/billing_managers",
    "auditors_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/auditors",
    "app_events_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/app_events",
    "space_quota_definitions_url": "/v2/organizations/811021f0-95f8-43a3-b50d-295788ed1be9/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1b4c7bd0-f939-4252-b16a-cf85ee1361a4
Content-Length: 1299
X-Content-Type-Options: nosniff