Create a profile role
Creates a new role for a profile, placing them into the initial lifecycle state for a specific class or course. A role represents the relationship between a candidate and a context — equivalent to an opportunity in a CRM. Include context_id in the request body to specify the class or course.
Path Parameters
- Type: stringprofile
_id requiredUnique identifier of the profile.
Body
application/json
- Type: stringcontext
_id requiredIdentifier of the context the role belongs to — a class or a course.
- Type: stringstate
_and _substate requiredInitial lifecycle state and substate as a single
state::substatestring. Both halves are required and must form a valid combination in the institution's lifecycle, otherwise the request returns 400.
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/apis/profiles/profiles/{profile_id}/roles
curl https://ff-business-school.fullfabric.cloud/apis/profiles/profiles/507f1f77bcf86cd799439011/roles \
--request POST \
--header 'Content-Type: application/json' \
--header 'FF-Auth: YOUR_SECRET_TOKEN' \
--data '{
"context_id": "6385bb46976a771912003e6a",
"state_and_substate": "prospect::cold"
}'
{
"id": "69a4bc1f9a52af33ee4f2200",
"withdrawn": false,
"withdrew_at": null,
"withdrawn_reasons": [],
"withdrawn_detail": null,
"state": "prospect",
"substate": "cold",
"state_and_substate": "prospect::cold",
"potential": "unknown",
"context_id": "6385bb46976a771912003e6a",
"context_type": "Institutions::ClassOf",
"campus_id": null,
"owner_id": null,
"last_updated_at": 1776330800
}