allows primary owner to grant ownership
PUT /api/v1/users/:id/grant_owner_privileges
Parameters
Request
Headers
Route
PUT /api/v1/users/248/grant_owner_privileges
Body
{}
cURL
curl "http://localhost:3000/api/v1/users/248/grant_owner_privileges" -d '{}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: gkhByindjeib87biNGwxvfDJeuzvpCC7KA" \
-H "X-Api-Email: user-244@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
202 Accepted
Body
{
"created_at": "2019-10-31T22:00:22Z",
"role": "owner",
"sanitized_name": "User Name",
"gravatar_url": "https://s.gravatar.com/avatar/cd515713b5cf121f3afc652fb5a0e2d1?d=mm",
"is_teachable_account": false,
"author_bio": null,
"author_bio_id": null,
"custom_role": null,
"custom_role_name": null,
"primary_owner?": false,
"show_custom_role_upgrade?": false,
"email": "user-245@example.com",
"notes": null,
"affiliate_code": "120_qz6frc2g",
"name": "User Name",
"is_owner": true,
"sign_in_count": 0,
"is_student": true,
"is_affiliate": false,
"is_author": false,
"src": null,
"current_sign_in_at": null,
"last_four": null,
"paypal_email": null,
"affiliate_revenue_share": null,
"joined_at": "2019-10-31T22:00:22Z",
"signed_up_affiliate_code": null,
"author_revenue_share": 0.0,
"last_sign_in_ip": null,
"current_sign_in_ip": null,
"id": 248,
"school_id": 120,
"teachable_account_id": null,
"is_staff_user": null,
"agree_updated_privacy_policy": true,
"unsubscribe_from_marketing_emails": null,
"meta": {
"class": "user",
"url": null,
"name": "User Name",
"description": "",
"image_url": null
},
"transactions_gross": 0
}