#!/bin/bash

# list forms of particular site:
curl https://api.webflow.com/sites/5856ff832e0823df0448f666/forms \
    -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
    -H 'accept-version: 1.0.0'

# response:
# [
#     {
#         "_id": "580e63e98c9a982ac9b8b741",
#         "createdOn": "2016-10-24T19:41:29.156Z",
#         "name": "Email Form",
#         "fields": [
#             {
#                 "id": "95f8ddc086128a309d227e08f9df3e53",
#                 "editable": true,
#                 "required": true,
#                 "type": "PlainText",
#                 "slug": "name",
#                 "name": "Name"
#             }, {
#                 "validations": {
#                   "singleLine": false
#                 },
#                 "id": "f3fee428d8c0458e16b927128415322c",
#                 "editable": true,
#                 "required": true,
#                 "type": "PlainText",
#                 "slug": "email",
#                 "name": "Email"
#             }    
#         ]
#     }
# ]

# get particular form:
curl https://api.webflow.com/sites/5856ff832e0823df0448f666/forms/580e63e98c9a982ac9b8b741 \
    -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
    -H 'accept-version: 1.0.0'

# response:
# {
#     "_id": "580e63e98c9a982ac9b8b741",
#     "createdOn": "2016-10-24T19:41:29.156Z",
#     "name": "Email Form",
#     "fields": [
#         {
#             "id": "95f8ddc086128a309d227e08f9df3e53",
#             "editable": true,
#             "required": true,
#             "type": "PlainText",
#             "slug": "name",
#             "name": "Name"
#         }, {
#             "validations": {
#               "singleLine": false
#             },
#             "id": "f3fee428d8c0458e16b927128415322c",
#             "editable": true,
#             "required": true,
#             "type": "PlainText",
#             "slug": "email",
#             "name": "Email"
#         }    
#     ]
# }
