API guide
Developers
Complyon API
Connect your own systems to Complyon through the REST API: log in, get a token, and read or update data.
OverviewWorking with the API#
The Complyon REST API lets you read and update data in Complyon from your own systems. All requests go to the base URL below and return JSON.
BASEhttps://system.complyon.com/api
- Authenticate with your Complyon email and password to get a bearer token.
- Send the token in the
Authorizationheader of every other request. - Most endpoints need a
clientparameter: the slug of the client (workspace) you’re working in. The login response lists the clients you have access to.
The API acts with the permissions of the user who logs in. The login endpoint uses a Complyon password, so the user needs password login (the Application authentication option). We recommend a dedicated integration user with only the access it needs.
Quick startYour first request in three steps#
- Step 1Log inPOST your email and password to
/login. - Step 2Keep the tokenCopy
tokenand a clientslugfrom the response. - Step 3Call the APISend
Authorization: Bearerwith every request.
# 1. Log in and get a token
curl -X POST "https://system.complyon.com/api/login" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}&password=${password}"
# 2. Use the token and a client slug from the response
curl -X GET "https://system.complyon.com/api/data-objects?client=${client_slug}" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}"ReferenceAuthentication#
Endpoints for logging in and out, and for resetting a password.
Log in#
POST/api/login
Returns the bearer token, details about the user, and the clients the user has access to. Add the token to the header of all other requests: Authorization: Bearer ${token}.
curl -X POST "https://system.complyon.com/api/login" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}&password=${password}"| Parameter | Example | Type | Required |
|---|---|---|---|
email | name@example.com | text | Yes |
password | #MyAwesomePassword86 | text | Yes |
{
"token": "ey...",
"user": {},
"clients": [
{ "id": 1, "slug": "complyon", "name": "Complyon" }
]
}Log out#
POST/api/logout
Invalidates the bearer token.
curl -X POST "https://system.complyon.com/api/logout" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" \
-d ""Reset a password#
Resetting a password takes two calls. First request a reset email, which contains a token. Then complete the reset with that token.
1. Request a reset email
POST/api/password/email
curl -X POST "https://system.complyon.com/api/password/email" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}"| Parameter | Example | Type | Required |
|---|---|---|---|
email | name@example.com | text | Yes |
2. Complete the reset
POST/api/password/reset
curl -X POST "https://system.complyon.com/api/password/reset" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}&password=${new_password}&password_confirmation=${new_password}&token=${password_reset_token}"| Parameter | Example | Type | Required |
|---|---|---|---|
email | name@example.com | text | Yes |
password | #MyAwesomePassword86 | text | Yes |
password_confirmation | #MyAwesomePassword86 | text | Yes |
token | The token from the reset email | text | Yes |
ReferenceData objects#
Data objects are the types of personal data your organization processes, used in the GDPR module. You can list, read, create, update and delete them.
List data objects#
GET/api/data-objects?client={client_slug}
Returns all data objects in the client.
curl -X GET "https://system.complyon.com/api/data-objects?client=${client_slug}" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}"| Parameter | Example | Type | Required |
|---|---|---|---|
client | complyon | slug | Yes |
page | 1 | number | No |
per_page | 10 | number | No |
sort | name | text | No |
order | asc or desc | text | No |
keyword | name | text | No |
The response is an object with an items array. Each item has the same fields as a single data object (below).
Get one data object#
GET/api/data-objects/{data_object_slug}
curl -X GET "https://system.complyon.com/api/data-objects/${data_object_slug}" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}"{
"id": 1,
"slug": "",
"name": "",
"classification": "",
"description": "",
"category": "",
"updated_at": "",
"business_classification": "",
"who_am_i": "App\\Maintenance\\DataObject\\Models\\DataObject",
"partition": false,
"created_by": {},
"tags_translated": [],
"updated_by": {}
}Create a data object#
POST/api/data-objects
curl -X POST "https://system.complyon.com/api/data-objects" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client=${client_slug}&name=${name}&classification=${classification}&description=${description}&category=${category}&tags[]=${tag_1}&tags[]=${tag_2}"| Parameter | Example | Type | Required |
|---|---|---|---|
client | complyon | slug | Yes |
name | Email address | text | Yes |
classification | Generic art. 6 | text | Yes |
description | Work email addresses of employees | text | No |
category | Contact details | text | No |
tags[] | tag1 | array | No |
Returns the created data object.
Update a data object#
PUT/api/data-objects/{data_object_slug}
curl -X PUT "https://system.complyon.com/api/data-objects/${data_object_slug}" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "name=${name}&classification=${classification}&description=${description}&category=${category}&tags[]=${tag_1}"| Parameter | Example | Type | Required |
|---|---|---|---|
name | Email address | text | Yes |
classification | Generic art. 6 | text | No |
description | Work email addresses of employees | text | No |
category | Contact details | text | No |
tags[] | tag1 | array | No |
Returns the updated data object.
Delete a data object#
DELETE/api/data-objects/{data_object_slug}
curl -X DELETE "https://system.complyon.com/api/data-objects/${data_object_slug}" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}"Was this article helpful?
