Passbolt API Documentation (4.9.0)
Download OpenAPI specification:Download
Public documentation for Passbolt's API
Welcome
This document is a raw low-level overview describing the API and its endpoints. For a higher-level overview of the API and some guides on interacting with the different endpoints, please follow the Developer guide.
Base URL
The API is served over HTTPS. All occurrences of {{API_BASE_URL}}
referenced in the following documentation should be replaced by the base url of your passbolt installation domain, such as: https://<passbolt.your-organization.com>
.
The legacy authentication method, using the GPGAuth protocol.
Find more here.
Check authentication status.
Can be used as a session keep-alive.
Authorizations:
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/auth/is-authenticated.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 401
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Log in.
Request Body schema: application/jsonrequired
The user's key fingerprint and challenge data when required.
required | object | ||||||||||
|
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "data": {
- "gpg_auth": {
- "keyid": "5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59"
}
}
}
Response samples
- 200
- 400
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/login.json",
- "code": 200
}, - "body": null
}
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/auth/logout.json
Response samples
- 200
- 401
- 403
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/auth/verify.json
Response samples
- 200
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/verify.json",
- "code": 200
}, - "body": {
- "fingerprint": "5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59",
- "keydata": "-----BEGIN PUBLIC KEY-----"
}
}
Verify the server's identity.
Request Body schema: application/jsonrequired
The user's key fingerprint and an encrypted challenge token.
required | object | ||||||||||
|
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "data": {
- "gpg_auth": {
- "keyid": "5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59",
- "server_verify_token": "-----BEGIN PGP MESSAGE-----"
}
}
}
Response samples
- 200
- 400
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/verify.json",
- "code": 200
}, - "body": null
}
JWT-based authentication is the preferred way to interact with the Passbolt API. Find more here
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/auth/jwt/jwks.json
Response samples
- 200
- 404
{- "keys": [
- {
- "kty": "RSA",
- "alg": "RS256",
- "use": "sig",
- "e": "AQAB",
- "n": "sP0CpKdQJF8KgPD9GOLiCssOhi8qHXp0TyyqkWNGWcZD3JTKuuWJhNn..."
}
]
}
Login.
Request Body schema: application/jsonrequired
The user and refresh token for session identification.
user_id required | string <uuid> |
challenge required | string
|
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "challenge": "-----BEGIN PGP MESSAGE-----"
}
Response samples
- 200
- 400
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/jwt/login.json",
- "code": 200
}, - "body": {
- "challenge": "-----BEGIN PGP MESSAGE-----"
}
}
Logout.
Authorizations:
Request Body schema: application/jsonrequired
The session associated to the refresh token you want to revoke.
refresh_token | string <uuid> |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "refresh_token": "ad71952e-7842-599e-a19e-3a82e6974b23"
}
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Refresh access token.
Authorizations:
Request Body schema: application/jsonrequired
The user and refresh token for session identification.
refresh_token required | string <uuid> |
user_id required | string <uuid> |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "refresh_token": "f8cea352-6bd3-4944-9523-20b31272bef0"
}
Response samples
- 200
- 400
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/jwt/refresh.json",
- "code": 200
}, - "body": {
- "access_token": "90c0d69c-a508-4cb6-a26c-799e52147ac0"
}
}
Get the JWT RSA server information.
This is not the key to use when encrypting the JWT login challenge.
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/auth/jwt/rsa.json
Response samples
- 200
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/auth/jwt/rsa.json",
- "code": 200
}, - "body": {
- "keydata": "-----BEGIN PUBLIC KEY-----"
}
}
Get an avatar as an image.
When the avatar doesn't exist, a placeholder image is returned instead.
path Parameters
avatarId required | string <uuid> ID for the avatar being manipulated. |
avatarFormat required | string Enum: "medium.jpg" "small.jpg" Format for the avatar being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb49/medium.jpg
Update a comment.
Authorizations:
path Parameters
commentId required | string <uuid> ID for the comment being manipulated. |
Request Body schema: application/jsonrequired
The comment you want to update
content required | string |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "content": "no comment"
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The comment was successfully updated.",
- "url": "/comments/41aca4aa-430c-4b60-a1f1-c0de1b52a1ce.json",
- "code": 200
}, - "body": {
- "id": "41aca4aa-430c-4b60-a1f1-c0de1b52a1ce",
- "parent_id": null,
- "foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "foreign_model": "Resource",
- "content": "no comment",
- "created": "2024-09-05T14:15:47+00:00",
- "modified": "2024-09-05T14:43:22+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2"
}
}
Delete a comment.
Authorizations:
path Parameters
commentId required | string <uuid> ID for the comment being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/comments/9149d7d7-e191-41d5-a263-cfccbd775f0b.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Get comments for a resource.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
query Parameters
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json",
- "code": 200
}, - "body": [
- {
- "id": "41aca4aa-430c-4b60-a1f1-c0de1b52a1ce",
- "parent_id": null,
- "foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "foreign_model": "Resource",
- "content": "no comment",
- "created": "2024-09-05T14:15:47+00:00",
- "modified": "2024-09-05T14:43:22+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "children": [ ]
}
]
}
Add a comment.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
Request Body schema: application/jsonrequired
The comment you want to add
content required | string |
parent_id | string <uuid> |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "content": "no comment"
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The comment was successfully added.",
- "url": "/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json",
- "code": 200
}, - "body": {
- "id": "41aca4aa-430c-4b60-a1f1-c0de1b52a1ce",
- "parent_id": null,
- "foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "foreign_model": "Resource",
- "content": "no comment",
- "created": "2024-09-05T14:15:47+00:00",
- "modified": "2024-09-05T14:43:22+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2"
}
}
Unset a resource as favorite.
Authorizations:
path Parameters
favoriteId required | string <uuid> ID for the favorite being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/favorites/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Set a resource as favorite.
Authorizations:
path Parameters
foreignModel required | string Value: "resource" Type for the foreign model being set as favorite. |
foreignId required | string <uuid> ID for the foreign element being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request POST \ --url {{API_BASE_URL}}/favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' --header 'Content-Type: application/json' \
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The resource was marked as favorite.",
- "url": "/favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json",
- "code": 200
}, - "body": {
- "id": "90a25878-a6c1-43c1-a983-68d27f2f0be8",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "foreign_model": "Resource",
- "created": "2024-08-07T13:39:29+00:00",
- "modified": "2024-08-07T13:39:29+00:00"
}
}
Get multiple folders.
Authorizations:
query Parameters
contain[children_resources] | integer Enum: 1 0 Add children resources to response body. |
contain[children_folders] | integer Enum: 1 0 Add children folders to response body. |
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[creator.profile] | integer Enum: 1 0 Add creator and their profile to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[modifier.profile] | integer Enum: 1 0 Add modifier and their profile to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
filter[has-id] | string <uuid> Only return elements filtered by their id. |
filter[has-parent] | string <uuid> Only return elements filtered by parent folder. |
filter[search] | string Filter using a keyword or a string. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/folders.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/folders.json",
- "code": 200,
- "pagination": {
- "count": 2,
- "page": 1,
- "limit": null
}
}, - "body": [
- {
- "id": "162e4717-59a2-439b-86c6-fc651e989939",
- "name": "Bob",
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "folder_parent_id": null,
- "personal": true
}, - {
- "id": "b2a72cb2-508c-43ad-b96f-697f7ad21635",
- "name": "Dylan",
- "created": "2024-07-26T08:10:49+00:00",
- "modified": "2024-07-26T08:10:49+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "folder_parent_id": "162e4717-59a2-439b-86c6-fc651e989939",
- "personal": true
}
]
}
Create a folder.
Authorizations:
query Parameters
contain[children_resources] | integer Enum: 1 0 Add children resources to response body. |
contain[children_folders] | integer Enum: 1 0 Add children folders to response body. |
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
Request Body schema: application/jsonrequired
The folder you want to create
name required | string |
folder_parent_id | string or null <uuid> |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "folder name"
}
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/folders/162e4717-59a2-439b-86c6-fc651e989939.json",
- "code": 200
}, - "body": {
- "id": "162e4717-59a2-439b-86c6-fc651e989939",
- "name": "Bob",
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "folder_parent_id": null,
- "personal": true
}
}
Get a folder.
Authorizations:
path Parameters
folderId required | string <uuid> ID for the folder being manipulated. |
query Parameters
contain[children_resources] | integer Enum: 1 0 Add children resources to response body. |
contain[children_folders] | integer Enum: 1 0 Add children folders to response body. |
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[creator.profile] | integer Enum: 1 0 Add creator and their profile to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[modifier.profile] | integer Enum: 1 0 Add modifier and their profile to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
filter[has-id] | string <uuid> Only return elements filtered by their id. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/folders/b2a72cb2-508c-43ad-b96f-697f7ad21635.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/folders/162e4717-59a2-439b-86c6-fc651e989939.json",
- "code": 200
}, - "body": {
- "id": "162e4717-59a2-439b-86c6-fc651e989939",
- "name": "Bob",
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "folder_parent_id": null,
- "personal": true
}
}
Update a folder.
The current user must have the “update” or “owner” permission on the folder.
Authorizations:
path Parameters
folderId required | string <uuid> ID for the folder being manipulated. |
query Parameters
contain[children_resources] | integer Enum: 1 0 Add children resources to response body. |
contain[children_folders] | integer Enum: 1 0 Add children folders to response body. |
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
Request Body schema: application/jsonrequired
The folder you want to update
name required | string |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "folder's new name"
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/folders/162e4717-59a2-439b-86c6-fc651e989939.json",
- "code": 200
}, - "body": {
- "id": "162e4717-59a2-439b-86c6-fc651e989939",
- "name": "Bob",
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "folder_parent_id": null,
- "personal": true
}
}
Delete a folder.
Authorizations:
path Parameters
folderId required | string <uuid> ID for the folder being manipulated. |
query Parameters
cascade | integer Enum: 1 0 Delete element and its children elements. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/folders/b2a72cb2-508c-43ad-b96f-697f7ad21635.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
In order to encrypt information, the server and the clients needs the user's public keys. These OpenPGP endpoints let you query the saved public key data.
Get multiple GPG keys.
Authorizations:
query Parameters
filter[modified-after] | string Only return elements modified after a timestamp. |
filter[is-deleted] | boolean Only return deleted elements. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/gpgkeys.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/gpgkeys.json",
- "code": 200,
- "pagination": {
- "count": 1,
- "page": 1,
- "limit": null
}
}, - "body": [
- {
- "id": "ed4d9ea6-f354-4a74-ad09-4e1dd69041ec",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----",
- "bits": 3072,
- "key_id": "D277E7A2E45418A0",
- "fingerprint": "850C6BDE59E9F126BFB4683BD277E7A2E45418A0",
- "type": "RSA",
- "expires": null,
- "key_created": "2024-07-03T12:53:13+00:00",
- "deleted": false,
- "created": "2024-07-03T12:53:52+00:00",
- "modified": "2024-07-03T12:53:52+00:00"
}
]
}
Get a GPG key.
Authorizations:
path Parameters
gpgkeyId required | string <uuid> ID for the GPG key being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json",
- "code": 200
}, - "body": {
- "id": "ed4d9ea6-f354-4a74-ad09-4e1dd69041ec",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----",
- "bits": 3072,
- "key_id": "D277E7A2E45418A0",
- "fingerprint": "850C6BDE59E9F126BFB4683BD277E7A2E45418A0",
- "type": "RSA",
- "expires": null,
- "key_created": "2024-07-03T12:53:13+00:00",
- "deleted": false,
- "created": "2024-07-03T12:53:52+00:00",
- "modified": "2024-07-03T12:53:52+00:00"
}
}
Get multiple groups.
Authorizations:
query Parameters
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[modifier.profile] | integer Enum: 1 0 Add modifier and their profile to response body. |
contain[my_group_user] | integer Enum: 1 0 Add |
contain[groups_users] | integer Enum: 1 0 Add group users to groups in response body. |
contain[groups_users.user] | integer Enum: 1 0 Add group users' user data to groups in response body. |
contain[groups_users.user.profile] | integer Enum: 1 0 Add group users' user profiles to groups in response body. |
contain[groups_users.user.gpgkey] | integer Enum: 1 0 Add group users' user gpg key to groups in response body. |
filter[has-users] | Array of strings <uuid> [ items <uuid > ] Only return elements filtered by users. |
filter[has-managers] | Array of strings <uuid> [ items <uuid > ] Only return elements filtered by managers. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/groups.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/groups.json",
- "code": 200
}, - "body": [
- {
- "id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "name": "Groupe B",
- "deleted": true,
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2"
}
]
}
Create a group.
Please note that only users with Admin role can create a group.
Authorizations:
Request Body schema: application/jsonrequired
The group you want to create
name required | string |
required | Array of objects |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "Groupe B",
- "groups_users": [
- {
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true
}
]
}
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/groups.json",
- "code": 200
}, - "body": {
- "id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "name": "Groupe B",
- "deleted": false,
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "groups_users": [
- {
- "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "group_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true,
- "created": "2024-07-22T16:01:07+00:00"
}
]
}
}
Get a group.
Authorizations:
path Parameters
groupId required | string <uuid> ID for the group being manipulated. |
query Parameters
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[modifier.profile] | integer Enum: 1 0 Add modifier and their profile to response body. |
contain[users] | integer Enum: 1 0 Add users to response body. |
contain[my_group_user] | integer Enum: 1 0 Add |
contain[groups_users] | integer Enum: 1 0 Add group users to groups in response body. |
contain[groups_users.user] | integer Enum: 1 0 Add group users' user data to groups in response body. |
contain[groups_users.user.profile] | integer Enum: 1 0 Add group users' user profiles to groups in response body. |
contain[groups_users.user.gpgkey] | integer Enum: 1 0 Add group users' user gpg key to groups in response body. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/groups.json",
- "code": 200
}, - "body": {
- "id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "name": "Groupe B",
- "deleted": true,
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2"
}
}
Update a group.
Authorizations:
path Parameters
groupId required | string <uuid> ID for the group being manipulated. |
Request Body schema: application/jsonrequired
The group you want to update
name required | string |
required | Array of objects |
Array of objects |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "WRC",
- "groups_users": [
- {
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true
}, - {
- "user_id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "is_admin": false
}, - {
- "user_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "deleted": true
}
], - "secrets": [
- {
- "resource_id": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "data": "-----BEGIN PGP MESSAGE-----"
}, - {
- "resource_id": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "user_id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "data": "-----BEGIN PGP MESSAGE-----"
}
]
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/groups.json",
- "code": 200
}, - "body": {
- "id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "name": "Groupe B",
- "deleted": false,
- "created": "2024-07-08T10:13:20+00:00",
- "modified": "2024-07-08T10:13:20+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "groups_users": [
- {
- "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "group_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true,
- "created": "2024-07-22T16:01:07+00:00"
}
]
}
}
Delete a group.
Only a group manager or a user with administrator role can delete a group. A group cannot be deleted as long as it is the sole owner of a shared resource or folder.
Authorizations:
path Parameters
groupId required | string <uuid> ID for the group being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Dry run a group update.
Authorizations:
path Parameters
groupId required | string <uuid> ID for the group being manipulated. |
Request Body schema: application/jsonrequired
The group you want to update
name required | string |
required | Array of objects |
Array of objects |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "WRC",
- "groups_users": [
- {
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true
}, - {
- "user_id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "is_admin": false
}, - {
- "user_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "deleted": true
}
], - "secrets": [
- {
- "resource_id": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "data": "-----BEGIN PGP MESSAGE-----"
}, - {
- "resource_id": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "user_id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "data": "-----BEGIN PGP MESSAGE-----"
}
]
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc/dry-run.json",
- "code": 200
}, - "body": {
- "dry-run": {
- "SecretsNeeded": [ ],
- "Secrets": [ ]
}
}
}
Dry run a group deletion.
Authorizations:
path Parameters
groupId required | string <uuid> ID for the group being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": [ ]
}
Get healthcheck information.
Only administrators can query this endpoint.
Authorizations:
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/healthcheck.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 403
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/healthcheck.json",
- "code": 200
}, - "body": {
- "environment": {
- "gnupg": true,
- "info": {
- "phpVersion": "8.2.20"
}, - "phpVersion": true,
- "nextMinPhpVersion": true,
- "pcre": true,
- "mbstring": true,
- "intl": true,
- "image": true,
- "tmpWritable": true,
- "logWritable": true
}, - "configFile": {
- "app": true,
- "passbolt": false
}, - "core": {
- "cache": true,
- "debugDisabled": false,
- "salt": true,
- "fullBaseUrl": true,
- "validFullBaseUrl": true,
- "fullBaseUrlReachable": true
}, - "ssl": {
- "info": "cURL Error (60) SSL certificate problem: self-signed certificate",
- "peerValid": false,
- "hostValid": false,
- "notSelfSigned": false
}, - "smtpSettings": {
- "isEnabled": true,
- "errorMessage": false,
- "source": "env variables",
- "isInDb": false,
- "areEndpointsDisabled": false,
- "customSslOptions": true
}, - "gpg": {
- "lib": true,
- "gpgHome": true,
- "gpgHomeWritable": true,
- "gpgKeyNotDefault": true,
- "gpgKeyPublicBlock": true,
- "gpgKeyPrivateBlock": true,
- "gpgKeyPublicReadable": true,
- "gpgKeyPrivateReadable": true,
- "gpgKeyPrivateFingerprint": true,
- "gpgKeyPublic": true,
- "gpgKeyPrivate": true,
- "gpgKey": true,
- "info": {
- "gpgKeyPrivate": "/etc/passbolt/gpg/serverkey_private.asc",
- "gpgHome": "/var/lib/passbolt/.gnupg"
}, - "gpgKeyPublicFingerprint": true,
- "gpgKeyPublicInKeyring": true,
- "gpgKeyPublicEmail": true,
- "canEncrypt": true,
- "canSign": true,
- "canEncryptSign": true,
- "canDecrypt": true,
- "canDecryptVerify": true,
- "canVerify": true,
- "isPublicServerKeyGopengpgCompatible": true,
- "isPrivateServerKeyGopengpgCompatible": true
}, - "applications": {
- "configPath": "/etc/passbolt/passbolt.php",
- "info": {
- "remoteVersion": "4.9.1",
- "currentVersion": "4.9.0"
}, - "latestVersion": false,
- "sslForce": false,
- "sslFullBaseUrl": true,
- "seleniumDisabled": true,
- "robotsIndexDisabled": true,
- "registrationClosed": {
- "isSelfRegistrationPluginEnabled": true,
- "selfRegistrationProvider": null,
- "isRegistrationPublicRemovedFromPassbolt": true
}, - "hostAvailabilityCheckEnabled": false,
- "jsProd": true,
- "emailNotificationEnabled": false,
- "schema": true
}, - "database": {
- "supportedBackend": true,
- "connect": true,
- "info": {
- "tablesCount": 31
}, - "tablesCount": true,
- "defaultContent": true
}
}
}
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/healthcheck/status.json
Response samples
- 200
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "OK",
- "url": "/healthcheck/status.json",
- "code": 200
}, - "body": "OK"
}
Move an element.
Authorizations:
path Parameters
foreignModel required | string Enum: "resource" "folder" Type for the foreign model being moved. |
foreignId required | string <uuid> ID for the foreign element being manipulated. |
Request Body schema: application/jsonrequired
The target parent folder ID
folder_parent_id required | string <uuid> |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "folder_parent_id": "a55d29ee-6781-49d6-b11e-36589d258be8"
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Check multi-factor authentication.
Check if MFA validation is needed. 400
means that this kind of MFA is not required.
Authorizations:
path Parameters
mfaProviderName | string Enum: "totp" "yubikey" Name for the MFA provider. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/mfa/verify/totp.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Attempt multi-factor authentication.
Authorizations:
path Parameters
mfaProviderName | string Enum: "totp" "yubikey" Name for the MFA provider. |
Request Body schema: application/jsonrequired
The code for the MFA attempt.
totp required | string One-time code for TOTP-based MFA. |
remember | integer Enum: 0 1 |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "totp": "635742"
}
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/mfa/verify/error.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 400
- 401
- 403
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "error",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "<ERROR MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 400
}, - "body": ""
}
Get permissions for a resource.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
query Parameters
contain[group] | integer Enum: 1 0 Add group to response body. |
contain[user] | integer Enum: 1 0 Add user to response body. |
contain[user.profile] | integer Enum: 1 0 Add user profile to user data in response body. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json",
- "code": 200
}, - "body": [
- {
- "id": "c4cc131e-b204-41e3-8e17-0f62be7d1d80",
- "aco": "Resource",
- "aco_foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "aro": "User",
- "aro_foreign_key": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "type": 15,
- "created": "2024-07-30T08:48:28+00:00",
- "modified": "2024-07-30T08:48:28+00:00"
}, - {
- "id": "4d664f1b-905e-4de4-ad2a-a7dce650565c",
- "aco": "Resource",
- "aco_foreign_key": "42968631-0c51-4405-9f2d-c6700c5057be",
- "aro": "User",
- "aro_foreign_key": "c48863da-32d3-48cd-9d47-de2891386423",
- "type": 1,
- "created": "2024-08-08T15:38:26+00:00",
- "modified": "2024-08-08T15:38:26+00:00"
}
]
}
Get multiple resources.
Authorizations:
query Parameters
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[favorite] | integer Enum: 1 0 Add favorite to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[secret] | integer Enum: 1 0 Add secrets to response body. |
contain[resource-type] | integer Enum: 1 0 Add resource type to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
filter[is-favorite] | boolean Only return favorite elements. |
filter[is-shared-with-group] | string <uuid> Only return elements shared with group. |
filter[is-owned-by-me] | boolean Only return elements owned by yourself. |
filter[is-shared-with-me] | boolean Only return elements shared to yourself and you are not owner. |
filter[has-id] | string <uuid> Only return elements filtered by their id. |
filter[has-parent] | string <uuid> Only return elements filtered by parent folder. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/resources.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/resources.json",
- "code": 200,
- "pagination": {
- "count": 2,
- "page": 1,
- "limit": null
}
}, - "body": [
- {
- "id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "name": "Hello World",
- "description": null,
- "deleted": false,
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "expired": null,
- "folder_parent_id": null,
- "personal": true
}, - {
- "id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "name": "Hello World",
- "description": null,
- "deleted": false,
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "expired": null,
- "folder_parent_id": null,
- "personal": true
}
]
}
Create a resource.
Authorizations:
Request Body schema: application/jsonrequired
The resource you want to create
name required | string |
username required | string |
uri required | string |
description | string |
resource_type_id required | string <uuid> |
folder_parent_id | string <uuid> |
expired | string or null <date-time> |
Array of objects |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "NextCloud",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "secrets": [
- {
- "data": "-----BEGIN PGP MESSAGE-----"
}
]
}
Response samples
- 200
- 400
- 401
{- "id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "name": "NextCloud",
- "description": null,
- "deleted": false,
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "expired": null,
- "personal": true,
- "folder_parent_id": null,
- "modifier": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "disabled": null,
- "last_logged_in": null
}, - "creator": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "disabled": null,
- "last_logged_in": null
}, - "secrets": [
- {
- "id": "c9e3b8e0-5ea9-4f40-a5e9-e3e4d2002be2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "data": "-----BEGIN PGP MESSAGE-----",
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00"
}
], - "permission": {
- "id": "799236fb-6a62-4527-b24e-545a344568c2",
- "aco": "Resource",
- "aco_foreign_key": "43051c9f-7122-4887-81e8-3b390cf0f04a",
- "aro": "User",
- "aro_foreign_key": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "type": 15,
- "created": "2024-07-23T09:55:39+00:00",
- "modified": "2024-07-23T09:55:39+00:00"
}
}
Get a resource.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
query Parameters
contain[creator] | integer Enum: 1 0 Add creator to response body. |
contain[favorite] | integer Enum: 1 0 Add favorite to response body. |
contain[modifier] | integer Enum: 1 0 Add modifier to response body. |
contain[secret] | integer Enum: 1 0 Add secrets to response body. |
contain[resource-type] | integer Enum: 1 0 Add resource type to response body. |
contain[permission] | integer Enum: 1 0 Add permission to response body. |
contain[permissions] | integer Enum: 1 0 Add permissions to response body. |
contain[permissions.user.profile] | integer Enum: 1 0 Add user profile to permissions in response body. |
contain[permissions.group] | integer Enum: 1 0 Add group to permissions in response body. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json",
- "code": 200
}, - "body": {
- "id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "name": "Hello World",
- "description": null,
- "deleted": false,
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "expired": null,
- "folder_parent_id": null,
- "personal": true
}
}
Update a resource.
If the password you are updating has been shared with 7 users, the secrets
key will need to be an array of 7 objects.
You must encrypt and sign the new plaintext passwords using the recipient public key and the current user secret key. You can then create a list which include one object per user: the data
key holds the encrypted plaintext password and user_id
holds the user UUID.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
Request Body schema: application/jsonrequired
The resource you want to update
name | string |
username | string |
uri | string |
description | string |
resource_type_id | string <uuid> |
expired | string or null <date-time> |
Array of objects |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "name": "NextCloud",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "secrets": [
- {
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "data": "-----BEGIN PGP MESSAGE-----"
}
]
}
Response samples
- 200
- 400
- 401
- 404
{- "id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "name": "NextCloud",
- "description": null,
- "deleted": false,
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00",
- "created_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "modified_by": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_type_id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
- "expired": null,
- "personal": true,
- "folder_parent_id": null,
- "modifier": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "disabled": null,
- "last_logged_in": null
}, - "creator": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "disabled": null,
- "last_logged_in": null
}, - "secrets": [
- {
- "id": "c9e3b8e0-5ea9-4f40-a5e9-e3e4d2002be2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "data": "-----BEGIN PGP MESSAGE-----",
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00"
}
], - "permission": {
- "id": "799236fb-6a62-4527-b24e-545a344568c2",
- "aco": "Resource",
- "aco_foreign_key": "43051c9f-7122-4887-81e8-3b390cf0f04a",
- "aro": "User",
- "aro_foreign_key": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "type": 15,
- "created": "2024-07-23T09:55:39+00:00",
- "modified": "2024-07-23T09:55:39+00:00"
}
}
Delete a resource.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Resource-types are used for describing how and what data is stored for a resource and its associated secrets.
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/resource-types.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/resource-types.json",
- "code": 200
}, - "body": [
- {
- "id": "669f8c64-242a-59fb-92fc-81f660975fd3",
- "slug": "password-and-description",
- "name": "Password with description",
- "description": "A resource with the password and the description encrypted.",
- "definition": {
- "resource": {
- "type": "object",
- "required": [
- "name"
], - "properties": {
- "name": {
- "type": "string",
- "maxLength": 255
}, - "username": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 255
}, - {
- "type": "null"
}
]
}, - "uri": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 1024
}, - {
- "type": "null"
}
]
}
}
}, - "secret": {
- "type": "object",
- "required": [
- "password"
], - "properties": {
- "password": {
- "type": "string",
- "maxLength": 4096
}, - "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 10000
}, - {
- "type": null
}
]
}
}
}
}, - "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00"
}
]
}
Get a resource type.
Authorizations:
path Parameters
resourceTypeId required | string <uuid> ID for the resource type being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/resource-types/669f8c64-242a-59fb-92fc-81f660975fd3.json",
- "code": 200
}, - "body": {
- "id": "669f8c64-242a-59fb-92fc-81f660975fd3",
- "slug": "password-and-description",
- "name": "Password with description",
- "description": "A resource with the password and the description encrypted.",
- "definition": {
- "resource": {
- "type": "object",
- "required": [
- "name"
], - "properties": {
- "name": {
- "type": "string",
- "maxLength": 255
}, - "username": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 255
}, - {
- "type": "null"
}
]
}, - "uri": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 1024
}, - {
- "type": "null"
}
]
}
}
}, - "secret": {
- "type": "object",
- "required": [
- "password"
], - "properties": {
- "password": {
- "type": "string",
- "maxLength": 4096
}, - "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 10000
}, - {
- "type": null
}
]
}
}
}
}, - "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00"
}
}
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/roles.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/roles.json",
- "code": 200
}, - "body": [
- {
- "id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "name": "admin",
- "description": "Organization administrator",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - {
- "id": "50307b17-a097-483b-b388-4bf262348180",
- "name": "guest",
- "description": "Non logged in user",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - {
- "id": "c2f96fb1-611d-466d-80fb-e82beba5ed87",
- "name": "user",
- "description": "Logged in user",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}
]
}
View user's secret for a resource.
Authorizations:
path Parameters
resourceId required | string <uuid> ID for the resource being manipulated. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/secrets/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/secrets/resource/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json",
- "code": 200,
- "pagination": {
- "count": 2,
- "page": 1,
- "limit": null
}
}, - "body": {
- "id": "c9e3b8e0-5ea9-4f40-a5e9-e3e4d2002be2",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "resource_id": "ae60d89c-f13b-4fb1-b2dc-c8dc806cac88",
- "data": "-----BEGIN PGP MESSAGE-----",
- "created": "2024-07-08T08:06:25+00:00",
- "modified": "2024-07-08T08:06:25+00:00"
}
}
Get multiple users.
Authorizations:
query Parameters
contain[last_logged_in] | integer Enum: 1 0 Add last logged in to response body. |
contain[groups_users] | integer Enum: 1 0 Add group users to groups in response body. |
contain[gpgkey] | integer Enum: 1 0 Add GPG key data to response body. |
contain[profile] | integer Enum: 1 0 Add profile to response body. |
contain[role] | integer Enum: 1 0 Add role to response body. |
filter[search] | string Filter using a keyword or a string. |
filter[has-groups] | Array of strings <uuid> [ items <uuid > ] Only return elements filtered by groups. |
filter[has-access] | Array of strings <uuid> [ items <uuid > ] Only return elements where specified users have access. |
filter[is-admin] | boolean Only return admin users. |
filter[is-active] | boolean Only return active elements. |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/users.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/users.json",
- "code": 200,
- "pagination": {
- "count": 1,
- "page": 1,
- "limit": null
}
}, - "body": [
- {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:53:52+00:00",
- "disabled": null,
- "groups_users": [
- {
- "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "group_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true,
- "created": "2024-07-22T16:01:07+00:00"
}
], - "profile": {
- "id": "920edf1e-5ce8-4da4-a8fc-21040fe78d09",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "first_name": "Ada",
- "last_name": "Lovelace",
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "avatar": {
- "url": {
}
}
}, - "gpgkey": {
- "id": "ed4d9ea6-f354-4a74-ad09-4e1dd69041ec",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----",
- "bits": 3072,
- "key_id": "D277E7A2E45418A0",
- "fingerprint": "850C6BDE59E9F126BFB4683BD277E7A2E45418A0",
- "type": "RSA",
- "expires": null,
- "key_created": "2024-07-03T12:53:13+00:00",
- "deleted": false,
- "created": "2024-07-03T12:53:52+00:00",
- "modified": "2024-07-03T12:53:52+00:00"
}, - "role": {
- "id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "name": "admin",
- "description": "Organization administrator",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - "last_logged_in": null
}
]
}
Create a user.
Only users with admin
role can create other users.
Authorizations:
Request Body schema: application/jsonrequired
The user you want to create
username required | string <email> |
role_id | string <uuid> |
required | object |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "profile": {
- "first_name": "Ada",
- "last_name": "Lovelace"
}
}
Response samples
- 200
- 400
- 401
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The user was successfully added. This user now need to complete the setup.",
- "url": "/users.json",
- "code": 200
}, - "body": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": false,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:53:52+00:00",
- "disabled": null,
- "groups_users": [ ],
- "profile": {
- "id": "920edf1e-5ce8-4da4-a8fc-21040fe78d09",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "first_name": "Ada",
- "last_name": "Lovelace",
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "avatar": {
- "url": {
}
}
}, - "gpgkey": null,
- "role": {
- "id": "c2f96fb1-611d-466d-80fb-e82beba5ed87",
- "name": "user",
- "description": "Logged in user",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - "last_logged_in": null
}
}
Get a user.
Authorizations:
path Parameters
userId required | string <uuid> ID for the user being manipulated. Can be set to |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request GET \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The operation was successful.",
- "url": "/users/8bb80df5-700c-48ce-b568-85a60fc3c8f2.json",
- "code": 200
}, - "body": {
- "is_mfa_enabled": false,
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:53:52+00:00",
- "disabled": null,
- "groups_users": [
- {
- "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "group_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true,
- "created": "2024-07-22T16:01:07+00:00"
}
], - "profile": {
- "id": "920edf1e-5ce8-4da4-a8fc-21040fe78d09",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "first_name": "Ada",
- "last_name": "Lovelace",
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "avatar": {
- "url": {
}
}
}, - "gpgkey": {
- "id": "ed4d9ea6-f354-4a74-ad09-4e1dd69041ec",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----",
- "bits": 3072,
- "key_id": "D277E7A2E45418A0",
- "fingerprint": "850C6BDE59E9F126BFB4683BD277E7A2E45418A0",
- "type": "RSA",
- "expires": null,
- "key_created": "2024-07-03T12:53:13+00:00",
- "deleted": false,
- "created": "2024-07-03T12:53:52+00:00",
- "modified": "2024-07-03T12:53:52+00:00"
}, - "role": {
- "id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "name": "admin",
- "description": "Organization administrator",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - "last_logged_in": null
}
}
Update a user.
Neither the email or the username field which can be updated, and only administrators can update a user's role.
Authorizations:
path Parameters
userId required | string <uuid> ID for the user being manipulated. Can be set to |
Request Body schema: application/jsonrequired
The user you want to update
role_id | string <uuid> |
disabled | boolean |
object |
Responses
Request samples
- Payload
- cURL
- JavaScript
- PHP
{- "profile": {
- "first_name": "Freddie",
- "last_name": "Mercury"
}
}
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "7ff2828c-1092-4897-8e0a-1dc64ada889f",
- "status": "success",
- "servertime": 1721207029,
- "action": "4d0c0996-ce30-4bce-9918-9062ab35c542",
- "message": "The user has been updated successfully.",
- "url": "/users/8bb80df5-700c-48ce-b568-85a60fc3c8f2.json",
- "code": 200
}, - "body": {
- "id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "role_id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "active": true,
- "deleted": false,
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:53:52+00:00",
- "disabled": null,
- "groups_users": [
- {
- "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f",
- "group_id": "8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "is_admin": true,
- "created": "2024-07-22T16:01:07+00:00"
}
], - "profile": {
- "id": "920edf1e-5ce8-4da4-a8fc-21040fe78d09",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "first_name": "Freddy",
- "last_name": "Mercury",
- "created": "2024-07-03T12:52:06+00:00",
- "modified": "2024-07-03T12:52:06+00:00",
- "avatar": {
- "url": {
}
}
}, - "gpgkey": {
- "id": "ed4d9ea6-f354-4a74-ad09-4e1dd69041ec",
- "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2",
- "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----",
- "bits": 3072,
- "key_id": "D277E7A2E45418A0",
- "fingerprint": "850C6BDE59E9F126BFB4683BD277E7A2E45418A0",
- "type": "RSA",
- "expires": null,
- "key_created": "2024-07-03T12:53:13+00:00",
- "deleted": false,
- "created": "2024-07-03T12:53:52+00:00",
- "modified": "2024-07-03T12:53:52+00:00"
}, - "role": {
- "id": "639b50cf-66f9-4b23-8d55-d0609710cd9d",
- "name": "admin",
- "description": "Organization administrator",
- "created": "2012-07-04T13:39:25+00:00",
- "modified": "2012-07-04T13:39:25+00:00"
}, - "last_logged_in": null
}
}
Delete a user.
Only a user with an administrator role can delete users. A user
can not be deleted as long as:
- They are the sole owner of a shared resource.
- They are a manager of a non empty group.
In this case you will need to transfer the ownership of the shared resources and appoint a new manager to the group in order to proceed.
Authorizations:
path Parameters
userId required | string <uuid> ID for the user being manipulated. Can be set to |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}
Dry run a user deletion.
Authorizations:
path Parameters
userId required | string <uuid> ID for the user being manipulated. Can be set to |
Responses
Request samples
- cURL
- JavaScript
- PHP
curl --request DELETE \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}'
Response samples
- 200
- 400
- 401
- 404
{- "header": {
- "id": "f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a",
- "status": "success",
- "servertime": 1721727753,
- "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
- "message": "<SUCCESS MESSAGE>",
- "url": "<API ENDPOINT URL>",
- "code": 200
}, - "body": null
}