Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/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.eyJ1c2VyX2lkIjoidWFhLWlkLTgwIiwiZW1haWwiOiJlbWFpbC02MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjQwfQ.DpCr8HzOsGhKxIkdYIQoCFAoEEj2y2oL6H1KId1Ghdw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgwIiwiZW1haWwiOiJlbWFpbC02MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjQwfQ.DpCr8HzOsGhKxIkdYIQoCFAoEEj2y2oL6H1KId1Ghdw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "740dd7ee-a932-4854-9e8f-92c738818778",
    "url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778",
    "created_at": "2016-04-06T00:17:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-227",
    "billing_enabled": false,
    "quota_definition_guid": "c6c981cb-9533-409a-a944-1e654cc5182c",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/c6c981cb-9533-409a-a944-1e654cc5182c",
    "spaces_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/spaces",
    "domains_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/domains",
    "private_domains_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/private_domains",
    "users_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/users",
    "managers_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/managers",
    "billing_managers_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/billing_managers",
    "auditors_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/auditors",
    "app_events_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/app_events",
    "space_quota_definitions_url": "/v2/organizations/740dd7ee-a932-4854-9e8f-92c738818778/space_quota_definitions"
  }
}

Headers

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