Owner Privileges API

blocks non-primary owner from granting ownership

PUT /api/v1/users/:id/grant_owner_privileges

Parameters

Name Description
id id

Request

Headers

Accept: application/json
X-Api-Token: z5aK7AmJHnb1cEKoFP4GaxYqyGysQray4A
X-Api-Email: user-242@example.com

Route

PUT /api/v1/users/246/grant_owner_privileges

Body

{}

cURL

curl "http://localhost:3000/api/v1/users/246/grant_owner_privileges" -d '{}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: z5aK7AmJHnb1cEKoFP4GaxYqyGysQray4A" \
	-H "X-Api-Email: user-242@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 84

Status

401 Unauthorized

Body

{
  "success": false,
  "error": "Unauthorized",
  "status": 401,
  "message": "You can't do that!"
}