NAME
Twilio::Rest::Sync::V1::Service::Document::DocumentPermission - The DocumentPermission resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $document_permission ($client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->read({}, 20)) {
...
}
my $document_permission = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->fetch;
$client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->update($read, $write, $manage);
$client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->delete;
DESCRIPTION
Sync document permissions
This file holds DocumentPermissionList, DocumentPermissionPage, DocumentPermissionContext and DocumentPermissionInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
DocumentPermissionList
Returned by $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions. See also Twilio::ListResource.
read
my @records = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->read(\%options, $limit, $page_size);
Retrieve a list of all Permissions applying to a Sync Document. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions->get_context($identity);
Returns a DocumentPermissionContext, and makes no request.
DocumentPermissionPage
A Twilio::Page of DocumentPermissionInstance objects.
records_key
build_instance
Used by Twilio::Page.
DocumentPermissionContext
Returned by $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity). It makes no request until one of these methods is called.
fetch
my $document_permission = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->fetch;
Fetch a specific Sync Document Permission. Returns a DocumentPermissionInstance.
update
my $document_permission = $client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->update($read, $write, $manage);
Update an identity's access to a specific Sync Document. Returns a DocumentPermissionInstance.
The required values are:
$read-
Whether the identity can read the Sync Document. Default value is
false. $write-
Whether the identity can update the Sync Document. Default value is
false. $manage-
Whether the identity can delete the Sync Document. Default value is
false.
delete
$client->sync->v1->services($service_sid)->documents($document_sid)->document_permissions($identity)->delete;
Delete a specific Sync Document Permission. Returns true.
DocumentPermissionInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Document Permission resource.
- document_sid
-
The SID of the Sync Document to which the Document Permission applies.
- identity
-
The application-defined string that uniquely identifies the resource's User within the Service to an FPA token.
- manage
-
Whether the identity can delete the Sync Document.
- read
-
Whether the identity can read the Sync Document.
- service_sid
-
The SID of the Sync Service the resource is associated with.
- url
-
The absolute URL of the Sync Document Permission resource.
- write
-
Whether the identity can update the Sync Document.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.