Enrollments API

is forbidden

PUT /api/v1/enrollments/:enrollment_id

Parameters

Name Description
is_active active status of the enrollment

Request

Headers

Accept: application/json
X-Api-Token: xT5r4_yg_Xv_mHHixmVxd3xivydckfzaBQ
X-Api-Email: user-277@example.com

Route

PUT /api/v1/enrollments/20

Body

{"is_active":false}

cURL

curl "http://localhost:3000/api/v1/enrollments/20" -d '{"is_active":false}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: xT5r4_yg_Xv_mHHixmVxd3xivydckfzaBQ" \
	-H "X-Api-Email: user-277@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!"
}