Create a public recipient/entity
Creates an entity from a public add-recipient form. The controller delegates to EntityService::createEntity, which scopes the program by client, validates sp_num according to program type, validates optional email format, enforces any unique public field configured on the HysForm, stores remaining request fields in entity json_fields, increments the program counter, logs frontend activity, and reloads the entity cache. The route is throttled by frontend-add-entity middleware.
Path Parameters
Client id that owns the target program and new entity.
Program id whose HysForm determines the public entity fields and whose counter is incremented.
Optional existing frontend session. When valid, successful creation binds the new recipient to this session for a subsequent public upload.
Body
Public entity fields. Known service-level fields are documented explicitly; all configured HysForm field keys may also be supplied and are stored in json_fields after field-type normalization.
Sponsorship number or goal. Validator rule is dynamic: nullable|integer for number programs, nullable|numeric for contribution/funding programs.
"1000"
Sponsorship amount stored on the entity after trimming.
"35.00"
Optional entity email. Validator rule: nullable|email.
"recipient@example.org"
Optional tags; the service joins them with commas and synchronizes client tags; tag names cannot contain commas.
Optional public visibility flag; defaults to visible when omitted.
true
Response
Entity created.
"success"
"Entity added successfully"
4711
A sponsorship recipient — the 'who/what' a donor sponsors. Entities can represent children, families, animals, projects, or any other sponsorable thing depending on the program. Like donors, entities have standardized columns plus arbitrary json_fields defined by the program's Hysform. Donations target an entity through the historical donation.designation column.