# Generate Access Token Source: https://docs.wearepion.com/api-reference/authentication/generate-access-token /api-reference/openapi-v1.json post /auth/token Exchange a Client ID and Client Secret for a short-lived access token. # Create a new Verification Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/create-a-new-verification /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications Creates a new verification and returns a unique verification ID # Create Email Attempt Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/create-email-attempt /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/email Sends an OTP to the provided email address. # Create Manual Attempt Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/create-manual-attempt /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/manual Submits document files for manual verification. # Create Portal Attempt Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/create-portal-attempt /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/portal Creates a portal attempt for the verification and returns a portal start URL. # Get Verification Details Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/get-verification-details /api-reference/openapi-v1.json get /app/{appId}/whitelabel/verifications/{verificationId} Retrieves the full verification data including user and institution information. # Get Verification Status Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/get-verification-status /api-reference/openapi-v1.json get /app/{appId}/whitelabel/verifications/{verificationId}/status Returns a streamlined state for a specific verification. # Institution Search Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/institution-search /api-reference/openapi-v1.json post /app/{appId}/whitelabel/institutions/search Searches for institutions matching the provided criteria. # Set Institution Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/set-institution /api-reference/openapi-v1.json patch /app/{appId}/whitelabel/verifications/{verificationId} Updates a verification with the selected institution. # Trigger Phone OTP Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/trigger-phone-otp /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/otp Sends a one-time passcode to the provided phone number. # Verification webhook Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/verification-webhook /api-reference/openapi-v1.json webhook verificationWebhook Pion sends this webhook for verification-related events. The webhook is signed using HMAC-SHA256 for security verification. # Verify Email OTP Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/verify-email-otp /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/email/verify Verifies the one-time passcode sent to the user's email. # Verify Phone OTP Source: https://docs.wearepion.com/api-reference/beans-id-whitelabel-api/verify-phone-otp /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/otp/verify Verifies the one-time passcode sent to the user's phone. # Overview Source: https://docs.wearepion.com/documentation/check-i-d-status/overview Our Code API lets you quickly check if a student’s account is active and valid. To set this up, we recommend a "keys-only" login (client credentials). This is the simplest way to connect because it only gives your system permission to do one thing: verify if a student is who they say they are. If you're looking to implement this service view the [SBiD Status API](/documentation/check-i-d-status/s-bi-d-status-api). # SBiD Status API Source: https://docs.wearepion.com/documentation/check-i-d-status/s-bi-d-status-api SBiD Code API is a service that allows partners to check the status of a Student Beans iD. ## **Authentication** For most use cases we suggest using the client\_credentials grant type to authenticate. When using the client\_credentials grant type you will only be allowed to request the id\_status scope which allows you to check the status of an SBiD Account. For more information around how to initiate the client credential auth flow please consult the official OAuth2 documentation at [https://tools.ietf.org/html/rfc6749](https://tools.ietf.org/html/rfc6749) In order to get started you will need to obtain an application id and application secret. Please get in touch with [hello@studentbeans.com](mailto:hello@studentbeans.com) . We have a default TTL for our tokens of 2 hours (or 7200 seconds). ## **API Domain** `https://accounts.studentbeans.com/` ## **Authorise Endpoint** If you need to get a bearer token please use the below endpoint to request your token `/oauth/authorize` ## **Token Endpoint** If you have a bearer token or if you are using client\_credentials, please use the below endpoint to get a token `/oauth/token` ## **Status endpoint** All status requests have to be made to: `/api/v1/id/code/status.json` **NOTE** We currently only support the JSON mime type ## **Single SBiD code status** ### **\[GET] Request Parameters** | **Parameter** | **Type** | **Description** | | :------------ | :------- | :----------------------------------------------------- | | access\_token | string | access token returned from the `/oauth/token` endpoint | | id\_code | string | Student Beans SBiD code of the user | **NOTE** HTTP method is GET so these need to be send in the query string ### **Response** ``` { "id_code": "ABCDEF1", "account": true, "verified": true } ``` ## **Batch SBiD codes status** By using the batch method you can process a greater volume of SBiDs without constantly running into your rate limit. The max batch size is currently set at 1000. ### **\[POST] Request Parameters** | **Parameter** | **Type** | **Description** | | :------------ | :------- | :----------------------------------------------------- | | access\_token | string | access token returned from the `/oauth/token` endpoint | | id\_codes | string | Comma seperated list of Student Beans SBiD codes | **NOTE** HTTP method is POST so these need to be send in the form data ### **Response** ``` [ { "id_code": "ABCDEF1", "account": true, "verified": true }, { "id_code": "ABCDEF2", "account": true, "verified": false }, { "id_code": "ABCDEF3", "account": false, "verified": false } ] ``` ## **Example SBiD Codes:** ``` 6C0475E (verified) 7E1729C (not verified) ``` ## **Quota / Rate limiting** Rate limits are currently set at 1 request per second however is negotiable on a case by case basis. If you would like to discuss increasing your rate limit please contact [hello@studentbeans.network](mailto:hello@studentbeans.network) with details of your use case. ## **Over limit Response** Should you go over your agreed rate limit the API will not fulfil your request, but instead return HTTP status code 429 to indicate the over limit state. Should you get the over limit error please retry your request. For more information about the 429 error code please consult [http://tools.ietf.org/html/rfc6585#section-4](http://tools.ietf.org/html/rfc6585#section-4) # Pion API Source: https://docs.wearepion.com/documentation/connect-with-your-customers/pion-api ## Authentication at Pion The Pion API provides an OAuth Client Credentials grant flow for accessing our services. Client credentials can be self-served in the Pion Portal. This will create a new pairing of a clientId and clientSecret that is used to fetch an access token that ***must*** be passed into requests that require authentication. Once you’ve got client credentials, you can send a request to the /auth/token endpoint. This is a post request with two body parameters. **Client ID** The Client ID is a unique identifier that is attached to your credentials by Pion. This should be considered sensitive data and stored securely. **Client Secret** The Client Secret is a confidential key that should be stored securely. This is used in conjunction with the Client ID to grant access to the Pion API. This endpoint will return an access token that can then be used in subsequent requests that require authentication. **Access Token** A short-lived token that is used to verify that a client has permissions to access Pion data. ## Leads The Lead Service captures rich, consented data directly from a brands verification integrations and marketplace, allowing you to enrich customer profiles and enhance your existing CRM. Leads are returned in batches of 1000. When a request has more than 1000 leads, an optional cursor attribute will be present in the response, which can be used to fetch the next batch of 1000 leads. | **Consumer Group** | **Data Available** | | :------------------------------------ | :-------------------------------------------------------------------------------------------------------------- | | Student & Graduate | Email Address, First Name, Last Name, Country, Institution, Date of Birth, Gender, Expiry Date, Graduation Year | | Key Worker & Social Assistance Groups | Email Address, First Name, Last Name, Country | Once you have a valid access token, retrieved via the /auth endpoint. You can use this token to request lead data for your organisation. This is a GET request with two query parameters. **From -** This is the date, formatted dd-mm-yyyy, that you would like the earliest lead data from. **To -** This is the date, formatted dd-mm-yyyy, that you would like the latest lead data from. **Cursor** **-** This is the optional reference object for the next item in the batch This endpoint will return a list of the lead data between the two ranges. # Technical Documentation ## \[POST] /auth/token POST [https://api.wearepion.com/auth/token](https://api.wearepion.com/auth/token) ### Body Params | **Field** | **Type** | **Description** | | :--------------- | :------- | :------------------------------------------ | | **clientId** | *string* | A unique ID provided by Pion | | **clientSecret** | *string* | A confidential, unique key provided by Pion | *Example Request Body*\*\*:\*\* ```text theme={null} { "clientId": "clientId", "clientSecret": "clientSecret" } ``` ### Headers | Content-Type | application/json | | :----------- | :--------------- | ### Example Responses #### 200 OK ```text theme={null} { "accessToken": "a1b2c3d4" } ``` #### 400 Bad Request ```text theme={null} { "error": { "title": "badRequest", "detail": "Reason for the failed request will be detailed here" } } ``` Examples of the detail statement can be as follows: * JSON body required * clientId required * clientSecret required #### 401 Unauthorised ```text theme={null} { "error": { "title": "unauthorised" } } ``` ## \[GET] /leads GET [https://api.wearepion.com/leads?from=13-01-2026\&to=13-02-2026](https://api.wearepion.com/leads?from=13-01-2026\&to=13-02-2026) ### Headers | Content-Type | application/json | | :------------ | :--------------- | | Authorization | Bearer a1b2c3d4 | ### Query Parameters | **from (required)** | dd-mm-yyyy | | | :-------------------- | :-------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | to (required) | dd-mm-yyyy | | | cursor **(optional)** | **\** | | | fields **(optional)** | | comma separated string of desired response fields in snakecase,
eg. fields\[lead]=email,institution,grad\_year options: `lead_type` `sbid` `email` `first_name` `second_name` `gender` `date_of_birth` `country` `institution` `grad_year` `created_at` | ### Example Responses #### `GET https://api.wearepion.com/leads?from=13-01-2026&to=13-02-2026` A request for leads data that does not contain the `fields` query parameter will return all available leads data within range. ```text theme={null} { "leads": [ { "lead_type": "online", "sbid": "someUserId", "email": "someuser@mail.com", "first_name": "Nicholas", "second_name": "Angel", "gender": "M", "date_of_birth": "2000-02-22", "country": "UK", "institution": "Canterbury University", "grad_year": 2024, "created_at": "2026-01-13T09:15:32Z" } ], cursor: "example_cursor" } ``` #### 400 Bad Request ```text theme={null} { "error": { "title": "badRequest", "detail": "Reason for the failed request will be detailed here" } } ``` #### 401 Unauthorised ```text theme={null} { "error": { "title": "unauthorised" } } ``` ## \[GET] /leads - Request Selected Fields Only Using the optional fields query parameter you may request leads data to return only selected fields. Available fields: * lead\_type * sbid * email * first\_name * second\_name * gender * date\_of\_birth * country * institution * grad\_year * created\_at ### Example Responses #### 200 OK `GET https://api.wearepion.com/leads?from=13-01-2026&to=13-02-2026&fields[lead]=email,institution,grad_year` ```text theme={null} { "leads": [ { "email": "someuser@mail.com", "institution": "Canterbury University", "grad_year": 2024 } ], cursor: "example_cursor" } ``` #### 422 Bad Request `GET https://api.wearepion.com/leads?from=13-01-2026&to=13-02-2026&fields[lead]=email,institution,potatoes` ```text theme={null} { "error": { "title": "UnprocessableEntityError", "detail": ["Invalid fields in fields[lead] parameter: nonexistentfield. Valid fields are: organisation_uid, created_at, lead_type, sbid, brand_uid, email, first_name, second_name, gender, date_of_birth, country, institution, grad_year, group, additional_info"] } } ``` #### 422 Bad Request `GET https://api.wearepion.com/leads?from=13-01-2026&to=13-02-2026&fields[lead]=` ```text theme={null} { "error": { "title": "UnprocessableEntityError", "detail": ["fields[lead] parameter must not be empty"] } } ``` # Overview Source: https://docs.wearepion.com/documentation/get-started/overview Welcome to the Pion Developer documentation. This site is your comprehensive guide to integrating and utilising the suite of products offered by Pion. Whether you're building new applications or enhancing existing ones, our documentation provides all the necessary information to help you succeed. Growth is simple when you can verify, own and reach audiences in one place.