The Pathwright REST APIs are currently limited, only exposing a few calls for external integrations.

We accept API requests as JSON requests only.

Note: These API docs are currently in alpha.

Authentication

Currently, Pathwright public APIs are only open to users with admin access in the school they with to use the API in.

Your API token, unique to your user and school, can be found on the school settings page in your API settings.

To use your auth token to authenticate with the Pathwright public APIs, specify an Authorization header of the format below:

Authorization: Token xxx

Alternatively, HTTP basic authentication is also supported, in which the API token should be specified as the username. The password is ignored and can be left blank.

Pagination

[//]: <> (TODO: Add pagination docs)

API Resources

  • External Links API — for managing links between users and external services
  • School Member API — for updating and managing school members
  • Webhook API — for managing outgoing webhook subscriptions from your Pathwright school to an external endpoint

Webhooks

Pathwright offers webhooks that can be sent to a URL of your choosing.

Because webhooks are consumed by a single API endpooint, webhooks follow the following form, allowing easy delineation of different event types.

Though it can usually be guaranteed that these webhooks will be only fired once, webhook consumers on external services should be aware of the possibility of duplicated events. The id field of the event object will be unique per event.

{
  "id": "4fe940ff-08ce-45c8-8f36-230724bb886b",
  "type": "event.type",
  "event_time": "2017-07-14T19:43:37Z",
  "data": {
    ...
  }
}

Webhook subscriptions can be managed using the Webhook API.

New school member

Sent when: a new member is created in the school.

Example webhook event

{
  "id": 12345,
  "type": "member.created",
  "event_time": "2017-11-14T19:43:37Z",
  "data": {
    "id": 12345,
    "first_name": "Test",
    "last_name": "Student",
    "email": "test@example.com",
    "profile": {
      "salutation": "Mr.",
      "bio": "A short biographical piece!",
      "location": "Greenville, SC",
      "phone_number": "8645550123"
    },
    "membership": {
      "membership_type": "admin"
    },
    "links": [
      {
        "id": 123,
        "link_type": "saml2",
        "external_id": "some_account@gsuite.example.com",
        "last_external_update": "2017-10-09T21:36:40.707776Z"
      }
    ]
  }
}