Api::V1::DripContentsController API

should create a new drip_content

POST /api/v1/drip_contents

Parameters

Name Description
lecture_section_id lecture_section_id
days days
is_dripped_by_date is_dripped_by_date
is_active is_active

Request

Headers

Accept: application/json
X-Api-Token: WXKMsxvUoHzgVhtZsqTEKpvtiUGtqujwuw
X-Api-Email: user-380@example.com

Route

POST /api/v1/drip_contents

Body

{"lecture_section_id":241,"days":0,"is_dripped_by_date":false,"is_active":false}

cURL

curl "http://localhost:3000/api/v1/drip_contents" -d '{"lecture_section_id":241,"days":0,"is_dripped_by_date":false,"is_active":false}' -X POST \
	-H "Accept: application/json" \
	-H "X-Api-Token: WXKMsxvUoHzgVhtZsqTEKpvtiUGtqujwuw" \
	-H "X-Api-Email: user-380@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

201 Created

Body

{
  "created_at": "2019-10-31T22:04:12Z",
  "drop_rate": 0,
  "open_rate": 0,
  "click_rate": 0,
  "deliver_rate": 0,
  "bounce_rate": 0,
  "days_until_drip": 0,
  "email_subject": null,
  "email_body": null,
  "days": 0,
  "is_dripped_by_date": false,
  "release_date": null,
  "is_active": false,
  "id": 5,
  "sent_count": 0,
  "meta": {
    "class": "dripcontent",
    "url": null,
    "name": "5",
    "description": "",
    "image_url": null
  },
  "open_count": 0,
  "click_count": 0,
  "drop_count": 0,
  "bounce_count": 0,
  "deliver_count": 0
}