
Enrolling a Student
When an accredited school accepts a student, the school submits that student to IAPST. The call creates a student member and records the current year of dues as paid, because the school collects those dues on the Association's behalf.
IAPST issues an API key for the school and lists the domains that may call. A program that does not yet have a key should write to the Association and name the domains its server will use.
Authentication
A call is accepted only when both of these are true.
- The
Authorizationheader isBearerfollowed by the school's API key. - The
OriginorRefererhostname is a domain IAPST has prelisted for that same school.
The key stays on the school's server. It is not placed in a page script. A server-side HTTP client does not send Origin on its own, so the school sets that header to https:// and one of its prelisted domains.
The match is the exact hostname. www is a different domain from the name without it. Wildcards, ports, and paths are not listed. If both Origin and Referer are present, they must name the same host. A key whose access has been turned off is rejected.
The request
POST https://www.iapst.org/api/accreditation/student-members
The body is a JSON object. Content-Type must be application/json.
curl -X POST https://www.iapst.org/api/accreditation/student-members \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Origin: https://admissions.example.edu" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@students.example.edu",
"programOfStudy": "Psychosexual Therapy",
"degreeBeingPursued": "M.A.",
"expectedGraduationDate": "2028-05-15",
"country": "United States",
"countryIso": "US",
"phone": "",
"studentId": "S-10001"
}'A browser on a prelisted domain may call the same address. The preflight succeeds only for an origin IAPST has listed for an active school. The key still has to be sent, which is why the call belongs on the server.
Fields
Unknown fields are ignored. The institution recorded on the membership is the school name IAPST has on file, not a name sent in the body.
| Field | Required | Limit | Use |
|---|---|---|---|
firstName | Yes | 100 characters | The student's given name. |
lastName | Yes | 100 characters | The student's family name. |
email | Yes | 255 characters | Where IAPST sends the password link. Stored in lowercase. |
programOfStudy | Yes | 200 characters | The accredited program the student was accepted into. |
country | Yes | 100 characters | The student's country. This sets the dues that are recorded as paid. |
middleName | No | 100 characters | — |
preferredName | No | 100 characters | Used as the greeting in the welcome email when it is sent. |
phone | No | 50 characters | — |
degreeBeingPursued | No | 200 characters | For example, M.A. |
expectedGraduationDate | No | YYYY-MM-DD | A real calendar date. Omit it if it is not known. |
countryIso | No | Two letters | ISO 3166-1 alpha-2. Sent with country, it confirms the dues tier. |
streetAddress | No | 255 characters | — |
city | No | 100 characters | — |
stateProvince | No | 100 characters | — |
postalCode | No | 20 characters | — |
studentId | No | 64 characters | The identifier the school uses for this student. IAPST stores it with the enrollment. |
What IAPST does
The student becomes a Student Member. Dues for one year, starting that day, are recorded as paid. The amount is USD 50, or USD 25 when the student's country is a Tier II country. amountCents in the response is that amount in cents.
The student receives the membership approval email, with a link to set a password. The link is sent only to the student. welcomeEmailSent is true when that email went out on this call.
Responses
A new student returns 201.
{
"ok": true,
"created": true,
"welcomeEmailSent": true,
"member": {
"enrollmentId": "…",
"memberId": "…",
"membershipNumber": "123456",
"email": "ada@students.example.edu",
"firstName": "Ada",
"lastName": "Lovelace",
"paidThrough": "2027-11-29T14:00:00.000Z",
"amountCents": 5000
}
}| Status | Meaning |
|---|---|
| 201 | The student member was created, and this year of dues was recorded as paid. |
| 200 | This school already submitted this email. No second membership is created, and no further year of dues is recorded. created is false. |
| 400 | The body is not a JSON object, or a field is missing or invalid. errors lists the field and the reason. |
| 401 | The API key is missing or not a key IAPST has issued. |
| 403 | The call did not come from a domain prelisted for this school, or this school's access has been turned off. |
| 409 | A member or an application already exists for this email through some other route. Write to info@iapst.org rather than submitting again. |
| 415 | The body was not sent as JSON. |
| 500 | The membership could not be created. The same request can be sent again. |
An error body is { "ok": false, "error": "…" }. A validation error also includes errors.
{
"ok": false,
"error": "The student information is incomplete.",
"errors": [
{ "field": "email", "message": "Email is required." }
]
}Sending the same student again
The school and the email together identify the enrollment. A repeat returns the member already created. It does not extend the paid year and it does not collect another year of dues. If the welcome email did not go out the first time, the repeat sends it, and welcomeEmailSent is then true. After the email has been sent, a later repeat leaves it false.
GET is not accepted. It returns 405.
