Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/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.eyJ1c2VyX2lkIjoidWFhLWlkLTM0IiwiZW1haWwiOiJlbWFpbC0xNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ4MDM4OTQzfQ.SIW6YQwRAXSgkLRkekKXtSxtc1MgX6J7OBVC_h8gNvo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0IiwiZW1haWwiOiJlbWFpbC0xNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ4MDM4OTQzfQ.SIW6YQwRAXSgkLRkekKXtSxtc1MgX6J7OBVC_h8gNvo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5e381b08-5394-4e09-aa5d-ea87ba0f44ca",
    "url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca",
    "created_at": "2015-11-13T17:02:23Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-27",
    "billing_enabled": false,
    "quota_definition_guid": "12d54eed-f03f-4b63-8914-1c9bf39a2b18",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/12d54eed-f03f-4b63-8914-1c9bf39a2b18",
    "spaces_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/spaces",
    "domains_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/domains",
    "private_domains_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/private_domains",
    "users_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/users",
    "managers_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/managers",
    "billing_managers_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/billing_managers",
    "auditors_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/auditors",
    "app_events_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/app_events",
    "space_quota_definitions_url": "/v2/organizations/5e381b08-5394-4e09-aa5d-ea87ba0f44ca/space_quota_definitions"
  }
}

Headers

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