Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/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.eyJ1c2VyX2lkIjoidWFhLWlkLTgwIiwiZW1haWwiOiJlbWFpbC00NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI0fQ.p61mYWRCUNFJdT5mUBICzuxrLxyCE-AjwKIjNbEB5Kg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgwIiwiZW1haWwiOiJlbWFpbC00NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI0fQ.p61mYWRCUNFJdT5mUBICzuxrLxyCE-AjwKIjNbEB5Kg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6409c2ab-188f-4f66-8fd6-44253a2f18af",
    "url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af",
    "created_at": "2016-04-16T01:23:44Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-91",
    "billing_enabled": false,
    "quota_definition_guid": "6aaa9c3b-73dd-46e1-9fd4-c87d85aec40d",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/6aaa9c3b-73dd-46e1-9fd4-c87d85aec40d",
    "spaces_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/spaces",
    "domains_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/domains",
    "private_domains_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/private_domains",
    "users_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/users",
    "managers_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/managers",
    "billing_managers_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/billing_managers",
    "auditors_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/auditors",
    "app_events_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/app_events",
    "space_quota_definitions_url": "/v2/organizations/6409c2ab-188f-4f66-8fd6-44253a2f18af/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a630e2fa-1885-4a4c-8da5-20b685ca551d
Content-Length: 1298
X-Content-Type-Options: nosniff