Domains API

PUT - /api/v1/domains/:id - Updating

PUT /api/v1/domains/:id

Parameters

Name Description
id id
is_primary primary domain?
url domain url

Request

Headers

Accept: application/json
X-Api-Token: NzYydShNVoLZptxxsSa9nYi5eXj4HAHR8A
X-Api-Email: user-682@example.com

Route

PUT /api/v1/domains/459

Body

{"url":"d399fff7db5631dbd91e454ff192f567.teachable.com"}

cURL

curl "http://localhost:3000/api/v1/domains/459" -d '{"url":"d399fff7db5631dbd91e454ff192f567.teachable.com"}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: NzYydShNVoLZptxxsSa9nYi5eXj4HAHR8A" \
	-H "X-Api-Email: user-682@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

200 OK

Body

{
  "redirect_url": "http://d399fff7db5631dbd91e454ff192f567.teachable.com/?sa=random-auth-token"
}