top of page

Enrolling a Student

Developer documentation for accredited schools.

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 Authorization header is Bearer followed by the school's API key.
  • The Origin or Referer hostname 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.

Student fields accepted by the enrollment API
FieldRequiredLimitUse
firstNameYes100 charactersThe student's given name.
lastNameYes100 charactersThe student's family name.
emailYes255 charactersWhere IAPST sends the password link. Stored in lowercase.
programOfStudyYes200 charactersThe accredited program the student was accepted into.
countryYes100 charactersThe student's country. This sets the dues that are recorded as paid.
middleNameNo100 characters—
preferredNameNo100 charactersUsed as the greeting in the welcome email when it is sent.
phoneNo50 characters—
degreeBeingPursuedNo200 charactersFor example, M.A.
expectedGraduationDateNoYYYY-MM-DDA real calendar date. Omit it if it is not known.
countryIsoNoTwo lettersISO 3166-1 alpha-2. Sent with country, it confirms the dues tier.
streetAddressNo255 characters—
cityNo100 characters—
stateProvinceNo100 characters—
postalCodeNo20 characters—
studentIdNo64 charactersThe 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
  }
}
HTTP status codes
StatusMeaning
201The student member was created, and this year of dues was recorded as paid.
200This school already submitted this email. No second membership is created, and no further year of dues is recorded. created is false.
400The body is not a JSON object, or a field is missing or invalid. errors lists the field and the reason.
401The API key is missing or not a key IAPST has issued.
403The call did not come from a domain prelisted for this school, or this school's access has been turned off.
409A member or an application already exists for this email through some other route. Write to info@iapst.org rather than submitting again.
415The body was not sent as JSON.
500The 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.

bottom of page