cURL
curl --request POST \ --url https://api.velt.dev/v2/authentication/permissions/add \ --header 'Content-Type: application/json' \ --header 'x-velt-api-key: <x-velt-api-key>' \ --header 'x-velt-auth-token: <x-velt-auth-token>' \ --data '{ "data": { "user": { "userId": "<string>" }, "permissions": { "resources": [ { "type": "<string>", "id": "<string>", "organizationId": "<string>", "expiresAt": 123 } ] } } }'
{ "result": { "status": "success", "message": "Permissions added successfully." } }
expiresAt
POST https://api.velt.dev/v2/authentication/permissions/add
Show properties
Show Resource Object
organization
document
folder
type
{ "data": { "user": { "userId": "some-user-id" }, "permissions": { "resources": [ { "type": "organization", "id": "YOUR_ORGANIZATION_ID" }, { "type": "document", "id": "YOUR_DOCUMENT_ID", "organizationId": "YOUR_ORGANIZATION_ID", "expiresAt": 1728902400 } ] } } }
{ "error": { "message": "ERROR_MESSAGE", "status": "INVALID_ARGUMENT" } }
Was this page helpful?