Form - OgnianApostolov/builderly-api-docs GitHub Wiki
Model
Form form {
"_id": {
"autogenerated": "true"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"subject": {
"type": "string"
},
"body": {
"type": "string"
},
"medias": [{
"type": "buffer"
}],
"additional": [{
"title": {
"type": "string"
},
"option": {
"type": "string"
}
}],
"createdAt": {
"autogenerated": "true"
},
"updatedAt": {
"autogenerated": "true"
}
}
Methods
Create new
POST /forms?ionic=true
req.body required
method: 'POST'
{
url: 'https://{{your-builderly-domain}}/forms?ionic=true',
headers,
json: true,
body: form
}
Responses
Redirect - status 302
{ currenturl }
Error - status 400
{
error_message
}
Retrieve multiple
GET /forms?
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/forms',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
[forms]
Error - status 500
{
error_message
}
- Example usages:
/forms
- Get all forms
Retrieve single
GET /forms/:id
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/forms/{{forms._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ form }
Not found - status 404
{}
Error - status 500
{
error_message
}
- Example usages:
/forms/:id
- Retrives a specific form
Update single
PATCH /forms/:id
method: 'PATCH'
{
url: 'https://{{your-builderly-domain}}/forms/{{form._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: form
}
Responses
Success - status 200
{ form }
Error - status 400
{
error_message
}
Not found - status 404
{}
Delete single
DELETE /forms/:id
method: 'DELETE'
{
url: 'https://{{your-builderly-domain}}/forms/{{form._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ form }
Error - status 400
{
error_message
}
Not found - status 404
{}