Add Attendee Page To A Campaign

Like Host Pages (and other action pages), Attendee Pages are comprised of 3 different objects: eventsignuppage, eventsignupform, and pagefollowup.

So we'll create and connect each of these in three different steps of adding the eventsignuppage, adding the eventsignupform, and adding the pagefollowup. Lastly, we'll examine the eventsignuppage once more to view the final created page.

1. Add The EventSignupPage

We first send a POST request to the eventsignuppage endpoint. Refer to the eventsignuppage schema for more details about the fields, filtering and ordering options available.

The required fields are name (the short name of the page), and campaign, which expects the URI of the associated campaign. However you probably also want to set title so that there is a page title associated with the attendee page.

POST /rest/v1/eventsignuppage/

{
        "campaign": "/rest/v1/campaign/175/",
        "name": "house-parties_attend",
        "title": "House Parties - Attend"
}

That results in an eventsignuppage with these default settings:

{
        "actions": "/rest/v1/eventsignupaction/?page=34880",
        "allow_multiple_responses": true,
        "campaign": "/rest/v1/campaign/175/",
        "created_at": "2017-04-03T21:23:54",
        "eventsignupform": null,
        "fields": {},
        "followup": null,
        "goal": null,
        "goal_type": "actions",
        "hidden": false,
        "hosted_with": "/rest/v1/hostingplatform/1/",
        "id": 34880,
        "language": null,
        "list": "/rest/v1/list/1/",
        "multilingual_campaign": null,
        "name": "house-parties_attend",
        "never_spam_check": false,
        "notes": "",
        "real_actions": true,
        "recognize": "once",
        "required_fields": [],
        "resource_uri": "/rest/v1/eventsignuppage/34880/",
        "status": "active",
        "tags": [],
        "title": "House Parties - Attend",
        "type": "EventSignup",
        "updated_at": "2017-04-03T21:23:54",
        "url": ""
}

If you want any of the page settings to be different from the default, just pass them in as additional fields when creating the page, or PATCH them afterwards:

POST /rest/v1/eventsignuppage/

{
        "campaign": "/rest/v1/campaign/175/",
        "goal": 100,
        "name": "house-parties_attend",
        "title": "House Parties - Attend"
}

If successful, in the response header we'll get back a 201 CREATED status code and the location of the newly created attendee page:

201 CREATED
Location: https://roboticdogs.actionkit.com/rest/v1/eventsignuppage/34880/

2. Add The EventSignupForm

Next, we'll add an eventsignupform. Refer to the eventsignupform schema for more details about the fields, filtering and ordering options available.

At minimum, we need to send the URI of the Attendee Page in the page field and thank_you_text in our POST request. thank_you_text is required for all page forms, but isn't actually used for Attendee Pages. You can put any value in for that field.

Here's an example of an eventsignupform created with the minimum fields:

POST /rest/v1/eventsignupform/

{
        "page": "/rest/v1/eventsignuppage/34880/",
        "thank_you_text": "ty"
}

201 CREATED
Location: https://roboticdogs.actionkit.com/rest/v1/eventsignupform/106/

The created eventsignupform looks like this:

GET /rest/v1/eventsignupform/106/

{
        "client_hosted": false,
        "client_url": "",
        "created_at": "2017-04-03T21:27:16",
        "custom_field_html": "",
        "ground_rules": "",
        "id": 106,
        "page": "/rest/v1/eventsignuppage/34880/",
        "resource_uri": "/rest/v1/eventsignupform/106/",
        "search_page_text": "",
        "signup_text": "",
        "templateset": "/rest/v1/templateset/713/",
        "thank_you_text": "ty",
        "tools_sidebar": "",
        "tools_text": "",
        "updated_at": "2017-04-03T21:27:16"
}

Just as with the eventsignuppage, if you wish to override the defaults, pass the field in the payload when you first create the eventsignupform.

3. Add The PageFollowup

And finally, we'll add the pagefollowup object. This endpoint requires the URI of the Attendee Page in the page field, and the URL for the after-action redirect in the url field.

POST /rest/v1/pagefollowup/

{
    "page": "/rest/v1/eventsignuppage/34880/",
    "url": "/cms/thanks/house-parties_attend"
}

201 CREATED
Location: https://roboticdogs.actionkit.com/rest/v1/pagefollowup/1925/

This created the page followup object of:

GET /rest/v1/pagefollowup/1925/

{
        "email_body": "",
        "email_custom_from": "",
        "email_from_line": "/rest/v1/fromline/1/",
        "email_subject": "",
        "email_wrapper": "/rest/v1/emailwrapper/1/",
        "id": 1925,
        "notifications": [],
        "page": "/rest/v1/eventsignuppage/34880/",
        "resource_uri": "/rest/v1/pagefollowup/1925/",
        "send_email": true,
        "send_notifications": false,
        "send_pushes": false,
        "send_taf": false,
        "share_description": "",
        "share_image": "",
        "share_title": "",
        "taf_body": "",
        "taf_subject": "",
        "twitter_message": "",
        "url": "/cms/thanks/house-parties_attend"
}

Checking The Attendee Page

Lastly, let's take a look to see how our Attendee Page record has changed.

GET /rest/v1/eventsignuppage/34850/

{
        "actions": "/rest/v1/eventsignupaction/?page=34880",
        "allow_multiple_responses": true,
        "campaign": "/rest/v1/campaign/189/",
        "cms_form": "/rest/v1/eventsignupform/106/",
        "created_at": "2017-04-03T21:23:54",
        "eventsignupform": {
                "client_hosted": false,
                "client_url": "",
                "created_at": "2017-04-03T21:27:16",
                "custom_field_html": "",
                "ground_rules": "",
                "id": 106,
                "page": "/rest/v1/eventsignuppage/34880/",
                "resource_uri": "/rest/v1/eventsignupform/106/",
                "search_page_text": "",
                "signup_text": "",
                "templateset": "/rest/v1/templateset/713/",
                "thank_you_text": "ty",
                "tools_sidebar": "",
                "tools_text": "",
                "updated_at": "2017-04-03T21:27:16"
        },
        "fields": {},
        "followup": {
                "email_body": "",
                "email_custom_from": "",
                "email_from_line": "/rest/v1/fromline/1/",
                "email_subject": "",
                "email_wrapper": "/rest/v1/emailwrapper/1/",
                "id": 1925,
                "notifications": [],
                "page": "/rest/v1/eventsignuppage/34880/",
                "resource_uri": "/rest/v1/pagefollowup/1925/",
                "send_email": true,
                "send_notifications": false,
                "send_pushes": false,
                "send_taf": false,
                "share_description": "",
                "share_image": "",
                "share_title": "",
                "taf_body": "",
                "taf_subject": "",
                "twitter_message": "",
                "url": "/cms/thanks/house-parties_attend"
        },
        "goal": null,
        "goal_type": "actions",
        "hidden": false,
        "hosted_with": "/rest/v1/hostingplatform/1/",
        "id": 34880,
        "language": null,
        "list": "/rest/v1/list/1/",
        "multilingual_campaign": null,
        "name": "house-parties_attend",
        "never_spam_check": false,
        "notes": "",
        "real_actions": true,
        "recognize": "once",
        "required_fields": [],
        "resource_uri": "/rest/v1/eventsignuppage/34880/",
        "status": "active",
        "tags": [],
        "title": "House Parties - Attend",
        "type": "EventSignup",
        "updated_at": "2017-04-03T21:23:54",
        "url": ""
}

The Attendee Page now has the URI for the eventsignupform in the cms_form field, and the eventsignupform and followup fields now contain the values of the linked eventsignupform and pagefollowup objects.

Next, learn how to add a signup to an event.