Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODh9.AAl8lV01-5cz8KoJS5-NYAHnWyN6qYjzeey3Q-N-VY8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODh9.AAl8lV01-5cz8KoJS5-NYAHnWyN6qYjzeey3Q-N-VY8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "fef6fb92-54c1-446e-b128-98114c477315",
    "url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315",
    "created_at": "2015-12-22T18:28:08Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-788",
    "billing_enabled": false,
    "quota_definition_guid": "0e289cf9-cd35-4efa-b364-3f6a79c5a162",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/0e289cf9-cd35-4efa-b364-3f6a79c5a162",
    "spaces_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/spaces",
    "domains_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/domains",
    "private_domains_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/private_domains",
    "users_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/users",
    "managers_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/managers",
    "billing_managers_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/billing_managers",
    "auditors_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/auditors",
    "app_events_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/app_events",
    "space_quota_definitions_url": "/v2/organizations/fef6fb92-54c1-446e-b128-98114c477315/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1299
X-Content-Type-Options: nosniff