POST
/
api
/
applications
Create Application
curl --request POST \
  --url https://monitoring.safeturf.ai/api/applications \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "source": "<string>",
  "form_data": {},
  "redirect_url": "<string>",
  "callback_url": "<string>"
}
'
Creates a blank draft application. Save the returned id — required for all subsequent calls.
type
string
required
Use "ONBOARDING".
source
string
required
Partner code, e.g. "PALMETTO".
form_data
object
Initial form data. Can be empty.
redirect_url
string
URL the onboarding UI redirects to after the merchant submits. Typically your partner portal.
callback_url
string
Webhook URL called by the backend after a successful submit. Receives a POST with the full application payload — see Submit Application for the callback body schema.
curl -X POST "https://monitoring.safeturf.ai/api/applications" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ONBOARDING",
    "source": "PALMETTO",
    "redirect_url": "https://portal.partner.com/dealers/123",
    "callback_url": "https://your-server.com/webhooks/safeturf"
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "draft",
  "current_step": null,
  "form_data": {}
}