Skip to main content

Endpoint

POST https://app.sling.com.ng/api/v2/forms/{formId}/submit
Submit form data on behalf of a contact. The endpoint resolves or creates a contact based on the submitted fields, stores the form response, and enrolls the contact into any active automations mapped to the form.

Headers

HeaderValue
Acceptapplication/json
AuthorizationBearer {API_TOKEN}
Content-Typeapplication/json

Path parameters

formId
integer
required
ID of the active form to submit to.

Body parameters

You can submit form data in two ways. Pick the one that matches how your form is built.
data
object
Map of form field keys to values. Use this when your form fields are namespaced or you want to keep submission metadata separate from the payload.
{
  "data": {
    "name": "Jane Doe",
    "email": "[email protected]",
    "phone": "2348012345678",
    "interest": "RCS"
  }
}
If data is not provided, every other field in the JSON body (excluding _token and _method) is treated as a form field. Empty and null values are stripped before processing.

Response fields

success
boolean
true when the submission is accepted.
entries_created
integer
Number of automation entries created from this submission.
message
string
Human-readable status. Present when no automations are mapped to the form, e.g. "Form submitted. No automations mapped.".

Example response

{
  "success": true,
  "entries_created": 2
}

Error responses

StatusMeaning
404Form not found or not active
422"No form data provided." — request body is empty
422Validation error from the form mapping (returned via message)
500"Form submission failed."