Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNyIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.fYh9wEUs7eunc9P2r7cDV9pubUZeoRXfW9Hay7PlQxg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNyIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.fYh9wEUs7eunc9P2r7cDV9pubUZeoRXfW9Hay7PlQxg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4987cec1-553e-46b1-af60-5f5133792419",
    "url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419",
    "created_at": "2015-10-07T00:35:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2135",
    "billing_enabled": false,
    "quota_definition_guid": "e5aab483-ac55-4877-be7c-36e2886dffb5",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/e5aab483-ac55-4877-be7c-36e2886dffb5",
    "spaces_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/spaces",
    "domains_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/domains",
    "private_domains_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/private_domains",
    "users_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/users",
    "managers_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/managers",
    "billing_managers_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/billing_managers",
    "auditors_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/auditors",
    "app_events_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/app_events",
    "space_quota_definitions_url": "/v2/organizations/4987cec1-553e-46b1-af60-5f5133792419/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 62ddca7b-c474-46de-86df-bcb6f4b18880
Content-Length: 1300
X-Content-Type-Options: nosniff