OAuth Operations
- Delete user and remove identifiable information
Propello Cloud API (3.0.0)
The Propello API has been created to allow organisations to interact with the Propello platform. There are a lot of different options available to integrators but we will aim to introduce these over the next few sections to help you get up and running quickly.
The rate limit is set to 120 calls per minute, however this can be changed upon request. Please speak to your Customer Success Manager to arrange this. You can view your current rate limit in the CMS in the group settings under the “Integration” tab.
If you have any questions around the integration or onboarding, please email tech@propellocloud.com
| SDKs |
|---|
| PHP |
| JavaScript |
When deciding on your implementation consider if there is potential for a user’s email to change. By default we do not allow users added via API to change their email address, making your system the single point of truth for these changes. Also consider how our platform will be updated with email changes.
company_name should only be used if you would like to refer to your user as their company name, generally because your database does not hold a first_name & last_name.
Additional metadata can be configured within the platform by a member of the Propello team, and updated by API. Metadata can be used to segment users in the platform for a number of reasons including reporting and targeted campaigns.
The group settings allow you to configure sending a new user added via the API an instant activation email and/or SMS with a tokenised URL to set their password. Once set, if you want to override this include either of the following variables in your request.
"send_activation_email": true|false
"send_activation_sms": true|false
If the send_activation_sms flag is set to true you need to provide a "phone" attribute in your request.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/create
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/create \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1,
"email": "john.smith@example.org",
"first_name": "John",
"last_name": "Smith",
"company_name": "Parisian Inc",
"UID": "ABC123",
"meta": {
"sales": 5,
"location": "London"
}
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "id": 987654, "UID": "ABC123", "first_name": "John", "last_name": "Smith", "email": "john.smith@example.org", "status": "Active", "created_at": "1970-01-30T00:00:00.000000Z" } }
When deciding on your implementation consider if there is potential for a user’s email to change. By default we do not allow users added via API to change their email address, making your system the single point of truth for these changes. Also consider how our platform will be updated with email changes.
company_name should only be used if you would like to refer to your user as their company name, generally because your database does not hold a first_name & last_name.
Additional metadata can be configured within the platform by a member of the Propello team, and updated by API. Metadata can be used to segment users in the platform for a number of reasons including reporting and targeted campaigns.
The group settings allow you to configure sending a new user added via the API an instant activation email and/or SMS with a tokenised URL to set their password. Once set, if you want to override this include either of the following variables in your request.
"send_activation_email": true|false
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/create/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/create/bulk \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"send_activation_email": false,
"data": [
{
"organisation_group_id": 1,
"email": "john.smith@example.org",
"first_name": "John",
"last_name": "Smith",
"company_name": "Parisian Inc",
"UID": "ABC123",
"meta": {
"sales": 5,
"location": "London"
}
}
]
}'{ "status": 202, "timestamp": "1970-01-30T00:00:00.000000Z", "data": [] }
If accessing via an organisation level token you will need to provide an organisation group id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/get/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/get/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "id": 987654, "UID": "ABC123", "first_name": "John", "last_name": "Smith", "email": "john.smith@example.org", "status": "Active", "created_at": "1970-01-30T00:00:00.000000Z" } }
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/list
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/list \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": [ { … } ] }
If accessing via an organisation level token you will need to provide an organisation_group_id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/update/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/update/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1,
"email": "john.smith@example.org",
"first_name": "John",
"last_name": "Smith",
"company_name": "Parisian Inc",
"UID": "ABC123",
"meta": {
"sales": 5,
"location": "London"
}
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "id": 987654, "UID": "ABC123", "first_name": "John", "last_name": "Smith", "email": "john.smith@example.org", "status": "Active", "created_at": "1970-01-30T00:00:00.000000Z" } }
Deleting a user, revokes their access to the platform but retains all information stored against them.
We suggest implementing a process to reactivate users if there is potential that they may return. If a request to create a user that already exists in either an active or deleted state is posted to our system, we will reject it.
If accessing via an organisation level token you will need to provide an organisation group id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/delete/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/delete/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": [] }
If accessing via an organisation level token you will need to provide an organisation group id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/restore/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/restore/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": [] }
It may be necessary to redirect a user to our platform and automatically authenticate them. Using this endpoint your system can receive a URL which will authenticate the user.
If accessing via an organisation level token you will need to provide an organisation group id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/login-url/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/login-url/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "login_url": "https://example.yourperx.com/auth-token/BkfEhiym5mvKYSrAp5iQ0YnRTB9mdo3r9kLXe6EuEhTPoAONLNIJ8TNzGerJVwgX" } }
If you need to create a user and automatically generate a login URL.
If accessing via an organisation level token you will need to provide an organisation_group_id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/create/login-url
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/create/login-url \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"organisation_group_id": 1,
"email": "john.smith@example.org",
"first_name": "John",
"last_name": "Smith",
"company_name": "Parisian Inc",
"UID": "ABC123",
"meta": {
"sales": 5,
"location": "London"
},
"return_user_details": false
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "login_url": "https://example.yourperx.com/auth-token/BkfEhiym5mvKYSrAp5iQ0YnRTB9mdo3r9kLXe6EuEhTPoAONLNIJ8TNzGerJVwgX", "user": { … } } }
By default the users UID will be maintained, if you wish to remove this you will need to pass a maintain_uid of false. Please note, if you anonymise the UID you will need to retain the record ID returned if the user is to be restored at a later date.
If accessing via an organisation level token you will need to provide an organisation_group_id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/anonymise/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/anonymise/email/john.smith@example.org \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"maintain_uid": true
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "id": 987654, "UID": "ABC123", "first_name": null, "last_name": null, "email": null, "created_at": "1970-01-30T00:00:00.000000Z" } }
If you wish to obtain a login url for the user when restoring, you can send a get_login value of true and a login_url value will be appended to the response.
If accessing via an organisation level token you will need to provide an organisation_group_id in order to indicate which group the user belongs to.
- Mock serverhttps://propello-cloud.redocly.app/_mock/openapi/v3/user/make-known/{identifier}/{identifier_value}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://propello-cloud.redocly.app/_mock/openapi/v3/user/make-known/UID/ABC1234 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"email": "john.smith@example.org",
"UID": "ABC123",
"first_name": "John",
"last_name": "Smith",
"company_name": "Smith Co Ltd.",
"billing_phone": "+441234567890",
"billing_email": "accounts@example.org",
"billing_address_line_1": "123 Example Road",
"billing_address_line_2": "City District",
"billing_postcode": "EX4 4PL",
"billing_county": "Lancashire",
"billing_country": "United Kingdom",
"get_login": true
}'{ "status": 200, "timestamp": "1970-01-30T00:00:00.000000Z", "data": { "id": 987654, "UID": "ABC123", "first_name": "John", "last_name": "Smith", "email": "john.smith@example.org", "created_at": "1970-01-30T00:00:00.000000Z", "login_url": "https://example.yourperx.com/auth-token/BkfEhiym5mvKYSrAp5iQ0YnRTB9mdo3r9kLXe6EuEhTPoAONLNIJ8TNzGerJVwgX" } }