> For the complete documentation index, see [llms.txt](https://selenium-4.gitbook.io/nexus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://selenium-4.gitbook.io/nexus-docs/documentation/document-services/operations/main-3.md).

# Grant Document Access

## Grant Document Access

> Grants a party temporary or permanent access to a document, with configurable permissions, timing, security and monitoring requirements.

```json
{"openapi":"3.0.3","info":{"title":"NEXUS Banking Services API","version":"1.0.0"},"tags":[{"name":"document-services"}],"servers":[{"url":"https://sandbox.nexus.selenium.ao","description":"Sandbox"},{"url":"https://api-mock.selenium.ao","description":"Mock"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer Token (OAuth2 / OIDC or JWT) passed in the `Authorization` header."}},"responses":{"BadRequest":{"description":"The request payload is invalid — inconsistent dates, an amount ≤ 0, an invalid currency, or missing required fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing, expired or invalid Bearer Token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InternalServerError":{"description":"Unexpected internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Error"}}},"Error":{"type":"object","required":["status","reason","message","path"],"properties":{"status":{"type":"integer","description":"HTTP status code of the error."},"reason":{"type":"string","description":"High-level error category code."},"message":{"type":"string","description":"Human-readable description of the problem."},"path":{"type":"string","description":"HTTP method and endpoint path that originated the error."},"errordetail":{"type":"array","description":"Detailed error list. May be absent for generic errors (e.g. 500).","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string","description":"Domain-specific error code."},"reason":{"type":"string","description":"Textual identifier of the specific cause."},"message":{"type":"string","description":"Detailed message, with concrete values where applicable."}}}}},"paths":{"/v1/document-services/document-directory/{document-directory-id}/grant":{"post":{"summary":"Grant Document Access","description":"Grants a party temporary or permanent access to a document, with configurable permissions, timing, security and monitoring requirements.","tags":["document-services"],"operationId":"grantDocumentAccess","parameters":[{"name":"document-directory-id","in":"path","required":true,"description":"Identifier of the document directory instance containing the document.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentDirectoryGrantInputRecord":{"type":"object","description":"Root object of the access grant request.","properties":{"documentDirectoryGrantActionRequest":{"type":"string","description":"Business action requested."},"documentDirectoryGrantActionTaskRecord":{"type":"object","description":"Task record for the access grant.","properties":{"documentDirectoryGrantActionRequest":{"type":"string","description":"Business action requested (repeated at task level)."},"documentDirectoryGrantActionTaskReference":{"type":"string","description":"Unique reference of the grant task."},"documentDirectoryInstanceReference":{"type":"string","description":"Identifier of the document directory instance."},"documentDirectoryEntryReference":{"type":"string","description":"Identifier of the document to which access is granted."},"documentDirectoryGrantRecord":{"type":"object","description":"Data of the access grant.","properties":{"grantType":{"type":"string","description":"Type of grant."},"grantReason":{"type":"string","description":"Reason for the access grant."},"grantRequestedBy":{"type":"string","description":"Identifier of who requested the access."},"grantApprovedBy":{"type":"string","description":"Identifier of who approved the access."},"grantRequestDate":{"type":"string","format":"date-time","description":"Date/time of the grant request."},"accessGrantDetails":{"type":"object","description":"Details of the access being granted.","properties":{"granteeInformation":{"type":"object","description":"Data of who is receiving the access.","properties":{"granteeId":{"type":"string","description":"Identifier of the grantee."},"granteeName":{"type":"string","description":"Name of the grantee."},"granteeType":{"type":"string","description":"Type of the grantee."},"granteeOrganization":{"type":"string","description":"Organization of the grantee."},"granteeEmail":{"type":"string","description":"Email of the grantee."},"granteeRole":{"type":"string","description":"Role of the grantee."},"authenticationMethod":{"type":"string","description":"Authentication method used by the grantee."}}},"accessPermissions":{"type":"object","description":"Level and limits of the permissions granted.","properties":{"permissionLevel":{"type":"string","description":"Level of permission granted."},"allowedActions":{"type":"array","items":{"type":"string"},"description":"Actions the grantee is allowed to perform."},"restrictedActions":{"type":"array","items":{"type":"string"},"description":"Actions the grantee is restricted from performing."},"downloadLimit":{"type":"integer","description":"Maximum number of downloads allowed."},"viewLimit":{"type":"integer","description":"Maximum number of views allowed."},"printLimit":{"type":"integer","description":"Maximum number of prints allowed."},"accessMethod":{"type":"array","items":{"type":"string"},"description":"Methods through which access is allowed."},"ipRestrictions":{"type":"array","items":{"type":"string"},"description":"IP address restrictions."},"deviceRestrictions":{"type":"array","items":{"type":"string"},"description":"Device restrictions."},"locationRestrictions":{"type":"array","items":{"type":"string"},"description":"Location restrictions."}}},"accessTiming":{"type":"object","description":"Time window of the access.","properties":{"accessStartDate":{"type":"string","format":"date-time","description":"Start date/time of the access."},"accessEndDate":{"type":"string","format":"date-time","description":"End date/time of the access."},"accessDuration":{"type":"string","description":"ISO 8601 duration."},"businessHoursOnly":{"type":"boolean","description":"Whether access is restricted to business hours."},"timezone":{"type":"string","description":"Timezone applicable to the access window."},"maxConcurrentSessions":{"type":"integer","description":"Maximum number of concurrent sessions allowed."},"sessionTimeout":{"type":"string","description":"ISO 8601 duration."}}},"securityRequirements":{"type":"object","description":"Security requirements for the access.","properties":{"requireDigitalSignature":{"type":"boolean","description":"Whether a digital signature is required."},"requireAuditLog":{"type":"boolean","description":"Whether an audit log is required."},"requireScreenshotPrevention":{"type":"boolean","description":"Whether screenshot prevention is required."},"requireWatermarking":{"type":"boolean","description":"Whether watermarking is required."},"watermarkText":{"type":"string","description":"Text to use as the watermark."},"requireNonDisclosureAgreement":{"type":"boolean","description":"Whether an NDA is required."},"ndaReference":{"type":"string","description":"Reference of the NDA."}}},"monitoringAndLogging":{"type":"object","description":"Monitoring configuration for the access.","properties":{"enableActivityMonitoring":{"type":"boolean","description":"Whether activity monitoring is enabled."},"logAllActions":{"type":"boolean","description":"Whether all actions are logged."},"realTimeAlerts":{"type":"boolean","description":"Whether real-time alerts are enabled."},"screenshotDetection":{"type":"boolean","description":"Whether screenshot detection is enabled."},"unusualActivityThreshold":{"type":"string","description":"Threshold for flagging unusual activity."},"reportingFrequency":{"type":"string","description":"Frequency of monitoring reports."},"reportingRecipients":{"type":"array","items":{"type":"string"},"description":"Recipients of monitoring reports."}}}}},"businessJustification":{"type":"object","description":"Business justification for the access.","properties":{"auditReference":{"type":"string","description":"Reference of the audit."},"auditType":{"type":"string","description":"Type of audit."},"auditScope":{"type":"string","description":"Scope of the audit."},"regulatoryRequirement":{"type":"string","description":"Regulatory requirement driving the access."},"expectedOutcome":{"type":"string","description":"Expected outcome of the access."},"documentRelevance":{"type":"string","description":"Relevance of the document to the audit/justification."}}},"approvalWorkflow":{"type":"object","description":"Approval workflow for the grant request.","properties":{"approvalRequired":{"type":"boolean","description":"Whether approval is required."},"approvalLevel":{"type":"string","description":"Level of approval required."},"approvalMatrix":{"type":"array","description":"Approvers required for the grant.","items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the approver."},"required":{"type":"boolean","description":"Whether this approver is required."},"approver":{"type":"string","description":"Identifier of the approver."}}}},"escalationRequired":{"type":"boolean","description":"Whether escalation is required."},"emergencyOverride":{"type":"boolean","description":"Whether an emergency override is allowed."}}}}}}}}}}}}}},"responses":{"200":{"description":"Document access granted.","content":{"application/json":{"schema":{"type":"object","properties":{"documentDirectoryGrantOutputRecord":{"type":"object","description":"Root object of the access grant response.","properties":{"documentDirectoryGrantActionTaskRecord":{"type":"object","properties":{"documentDirectoryGrantActionTaskRecord":{"type":"object","properties":{"documentDirectoryInstanceRecord":{"type":"object","properties":{"documentDirectoryInstanceReference":{"type":"string","description":"Identifier of the document directory instance."},"documentDirectoryInstanceStatus":{"type":"string","description":"Status of the directory instance."},"documentDirectoryEntryRecord":{"type":"object","properties":{"documentEntryReference":{"type":"string","description":"Identifier of the document."},"documentEntryDetails":{"type":"object","properties":{"documentId":{"type":"string","description":"Identifier of the document."},"documentType":{"type":"string","description":"Type of the document."},"documentStatus":{"type":"string","description":"Status of the document."},"accessGrantRecord":{"type":"object","description":"Record of the access grant.","properties":{"accessGrantId":{"type":"string","description":"Unique identifier of the access grant."},"grantStatus":{"type":"string","description":"Status of the grant."},"grantType":{"type":"string","description":"Type of grant."},"grantApprovalDate":{"type":"string","format":"date-time","description":"Date/time the grant was approved."},"grantActivationDate":{"type":"string","format":"date-time","description":"Date/time the grant was activated."},"grantExpiryDate":{"type":"string","format":"date-time","description":"Date/time the grant expires."},"accessCredentials":{"type":"object","description":"Credentials issued for the access.","properties":{"accessToken":{"type":"string","description":"Access token issued."},"tokenType":{"type":"string","description":"Type of the token."},"tokenExpiry":{"type":"string","format":"date-time","description":"Expiry date/time of the token."},"refreshToken":{"type":"string","description":"Refresh token issued."},"accessUrl":{"type":"string","description":"URL to access the document."},"sessionId":{"type":"string","description":"Identifier of the access session."},"authenticationPin":{"type":"string","description":"PIN required to authenticate the access."}}},"grantedPermissions":{"type":"object","description":"Permissions and usage counters granted.","properties":{"permissionLevel":{"type":"string","description":"Level of permission granted."},"allowedActions":{"type":"array","items":{"type":"string"},"description":"Actions the grantee is allowed to perform."},"downloadLimit":{"type":"integer","description":"Maximum number of downloads allowed."},"downloadCount":{"type":"integer","description":"Number of downloads used so far."},"viewLimit":{"type":"integer","description":"Maximum number of views allowed."},"viewCount":{"type":"integer","description":"Number of views used so far."},"printLimit":{"type":"integer","description":"Maximum number of prints allowed."},"printCount":{"type":"integer","description":"Number of prints used so far."},"accessMethod":{"type":"array","items":{"type":"string"},"description":"Methods through which access is allowed."}}},"securityMeasures":{"type":"object","description":"Active security measures.","properties":{"encryptionEnabled":{"type":"boolean","description":"Whether encryption is enabled."},"watermarkingEnabled":{"type":"boolean","description":"Whether watermarking is enabled."},"watermarkText":{"type":"string","description":"Text used as the watermark."},"auditLoggingEnabled":{"type":"boolean","description":"Whether audit logging is enabled."},"screenshotPrevention":{"type":"boolean","description":"Whether screenshot prevention is enabled."},"ipRestrictions":{"type":"array","items":{"type":"string"},"description":"IP address restrictions."},"deviceRestrictions":{"type":"array","items":{"type":"string"},"description":"Device restrictions."}}},"complianceRecords":{"type":"object","description":"Compliance records for the grant.","properties":{"ndaAgreementSigned":{"type":"boolean","description":"Whether the NDA agreement was signed."},"ndaReference":{"type":"string","description":"Reference of the NDA."},"ndaSignDate":{"type":"string","format":"date-time","description":"Date/time the NDA was signed."},"regulatoryApprovalObtained":{"type":"boolean","description":"Whether regulatory approval was obtained."},"auditTrailReference":{"type":"string","description":"Reference of the audit trail."},"dataProtectionCompliance":{"type":"string","description":"Data protection compliance status."}}}}}}}}}}}}}}}}},"documentDirectoryGrantActionResponse":{"type":"object","description":"Outcome of the access grant.","properties":{"documentDirectoryGrantActionResponseCode":{"type":"string","description":"Result code of the operation."},"documentDirectoryGrantActionResponseMessage":{"type":"string","description":"Human-readable message describing the result."},"documentDirectoryGrantActionResponseDetails":{"type":"object","description":"Additional details of the grant result.","properties":{"accessGrantId":{"type":"string","description":"Identifier of the access grant."},"documentId":{"type":"string","description":"Identifier of the document."},"granteeId":{"type":"string","description":"Identifier of the grantee."},"granteeName":{"type":"string","description":"Name of the grantee."},"grantStatus":{"type":"string","description":"Status of the grant."},"grantActivationDate":{"type":"string","format":"date-time","description":"Date/time the grant was activated."},"grantExpiryDate":{"type":"string","format":"date-time","description":"Date/time the grant expires."},"accessUrl":{"type":"string","description":"URL to access the document."},"authenticationPin":{"type":"string","description":"PIN required to authenticate the access."},"accessInstructions":{"type":"array","items":{"type":"string"},"description":"Instructions for accessing the document."},"supportContact":{"type":"object","description":"Contact for support.","properties":{"contactName":{"type":"string","description":"Name of the support contact."},"contactEmail":{"type":"string","description":"Email of the support contact."},"contactPhone":{"type":"string","description":"Phone number of the support contact."},"supportHours":{"type":"string","description":"Support hours."}}},"complianceConfirmations":{"type":"object","description":"Compliance confirmations for the grant.","properties":{"ndaConfirmed":{"type":"boolean","description":"Whether the NDA was confirmed."},"regulatoryApprovalConfirmed":{"type":"boolean","description":"Whether regulatory approval was confirmed."},"securityMeasuresActive":{"type":"boolean","description":"Whether security measures are active."},"monitoringActive":{"type":"boolean","description":"Whether monitoring is active."}}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://selenium-4.gitbook.io/nexus-docs/documentation/document-services/operations/main-3.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
