Home
Version 3
Organizations API

Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/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.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNiIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDF9.fPJWm8WARxBvqlWxqfK5IhA_-fiG5BuO_cp6w-tJYeI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/users" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNiIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDF9.fPJWm8WARxBvqlWxqfK5IhA_-fiG5BuO_cp6w-tJYeI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "647f1355-24a6-4966-9113-2eaebe0faefb",
    "url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb",
    "created_at": "2016-02-19T02:04:01Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2325",
    "billing_enabled": false,
    "quota_definition_guid": "9dfb7f03-1631-47a6-ba3d-fdc5e8b29fbf",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/9dfb7f03-1631-47a6-ba3d-fdc5e8b29fbf",
    "spaces_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/spaces",
    "domains_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/domains",
    "private_domains_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/private_domains",
    "users_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/users",
    "managers_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/managers",
    "billing_managers_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/billing_managers",
    "auditors_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/auditors",
    "app_events_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/app_events",
    "space_quota_definitions_url": "/v2/organizations/647f1355-24a6-4966-9113-2eaebe0faefb/space_quota_definitions"
  }
}

Headers

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