This endpoint allows you to work with contact forms

Collection /contact-form

To work with contact forms in your account.

GET /contact-form

Get all the contact forms in your account.

item value
Access user
Full url https://api.buto.tv/v2/contact-form
verb GET

Example Usage

Request

curl -u API_KEY:x --include https://api.buto.tv/v2/contact-form

Response

HTTP/1.1 200 OK
...
Content-Type: application/json
[
    {
        "contact_form_id": "cf8BlWr",
        "primary_text": "Sample title",
        "secondary_text": "More information about primary text",
        "reference": "Sample reference",
        "capture_names": "0",
        "capture_company_name": "1",
        "capture_opt_in": "1",
        "opt_in_message": "I agree",
        "button_text":"Submit",
        "gated": "1",
        "created_by_user_id": "B15wt",
        "organisation_id": "Bbgwg",
        "date_created": "2018-12-10 10:54:21"
    },
    ...
]

GET /contact-form/:contact_form_id

Get an existing contact form

item | value
-|-
Access | user
Full url | https://api.buto.tv/v2/contact-form/:contact_form_id
verb | GET


Example Usage

Given the example contact form created in the POST section.

Request
api_key=<your api key>
contact_form_id=cf8BlWr
curl -X GET -u ${api_key}:x \
  --include https://api.buto.tv/v2/contact-form/${contact_form_id}
JSON Response
HTTP/1.1 200 OK
...
Content-Type: application/json

{
    "contact_form_id": "cf8BlWr",
    "primary_text": "Sample title",
    "secondary_text": "More information about primary text",
    "reference": "Sample reference",
    "capture_names": "0",
    "capture_company_name": "1",
    "capture_opt_in": "1",
    "opt_in_message": "I agree",
    "button_text":"Submit",
    "gated": "1",
    "created_by_user_id": "B15wt",
    "organisation_id": "Bbgwg",
    "date_created": "2018-12-10 10:54:21"
}

POST /contact-form

Create a new contact form

item | value
-|-
Access | user
Full url | https://api.buto.tv/v2/contact-form
verb | POST
params | string primary_text string secondary_text string reference boolean capture_company_names boolean capture_names boolean capture_opt_in string opt_in_message string button_text gated string
params note | Atleast one of primary_text or reference is required.


Example Usage

Request
api_key=<your api key>
curl -X POST -u ${api_key}:x \
  --include https://api.buto.tv/v2/contact-form \
  -H 'Content-Type: application/json' \
  -d '{
        "primary_text": "Sample title",
        "secondary_text": "More information about primary text",
        "reference": "Sample reference",
        "capture_company_name": true,
        "capture_names": false,
        "capture_opt_in": true,
        "opt_in_message": "I agree",
        "button_text": "Submit",
        "gated": true
    }'
JSON Response
HTTP/1.1 200 OK
...
Content-Type: application/json

{
    "contact_form_id": "cf8BlWr",
    "primary_text": "Sample title",
    "secondary_text": "More information about primary text",
    "reference": "Sample reference",
    "capture_names": "0",
    "capture_company_name": "1",
    "capture_opt_in": "1",
    "opt_in_message": "I agree",
    "button_text":"Submit",
    "gated": "1",
    "created_by_user_id": "B15wt",
    "organisation_id": "Bbgwg",
    "date_created": "2018-12-10 10:54:21"
}

DELETE /contact-form/:contact_form_id

DELETE an existing contact form. This is a HARD delete. If you delete a contact form, it can NEVER be restored.

item | value
-|-
Access | user
Full url | https://api.buto.tv/v2/contact-form/:contact_form_id
verb | DELETE


Example Usage

Request
api_key=<your api key>
contact_form_id=cf8BlWr
curl -X DELETE -u ${api_key}:x \
  --include https://api.buto.tv/v2/contact-form/${contact_form_id}
JSON Response
HTTP/1.1 200 OK
...
Content-Type: application/json

{
    "deleted": true
}