Update an identity's access to a specific Sync Document.

POST /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}

Sync document permissions

Update an identity's access to a specific Sync Document.

Path parameters

  • ServiceSid string Required

    The SID of the Sync Service with the Document Permission resource to update.

  • DocumentSid string Required

    The SID of the Sync Document with the Document Permission resource to update. Can be the Document resource's sid or its unique_name.

  • Identity string Required

    The application-defined string that uniquely identifies the User's Document Permission resource to update.

application/x-www-form-urlencoded

Body

  • Read boolean Required

    Whether the identity can read the Sync Document. Default value is false.

  • Write boolean Required

    Whether the identity can update the Sync Document. Default value is false.

  • Manage boolean Required

    Whether the identity can delete the Sync Document. Default value is false.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the Document Permission resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • service_sid string | null

      The SID of the Sync Service the resource is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IS[0-9a-fA-F]{32}$.

    • document_sid string | null

      The SID of the Sync Document to which the Document Permission applies.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ET[0-9a-fA-F]{32}$.

    • identity string | null

      The application-defined string that uniquely identifies the resource's User within the Service to an FPA token.

    • read boolean | null

      Whether the identity can read the Sync Document.

    • write boolean | null

      Whether the identity can update the Sync Document.

    • manage boolean | null

      Whether the identity can delete the Sync Document.

    • url string(uri) | null

      The absolute URL of the Sync Document Permission resource.

POST /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}
curl \
 --request POST 'https://sync.twilio.com/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Read=true&Write=true&Manage=true'
Request example
{"Read"=>"true", "Write"=>"true", "Manage"=>"true"}
Response examples (200)
{
  "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents/ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions/identity",
  "read": true,
  "write": true,
  "manage": true,
  "identity": "identity",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "document_sid": "ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}