Editing a document

How to edit an already created document

After creating the document, you can still edit some of its settings. The mutation for updating the document is shown below:

mutation (
  $id: UUID!,
  $document: UpdateDocumentInput! 
) {
  updateDocument(id: $id, document: $document) {
    id
    name
    message
    reminder
    refusable
    sortable
    stop_on_rejected
    new_signature_style
    show_audit_page
    expiration_at
    deadline_at
    email_template_id
    footer
    cc
    configs {
      notification_finished
      notification_signed
      signature_appearance
    }
    created_at
   }
}

Parameters:

  • id: A String (UUID!) that represents the unique identifier of the document you want to edit.

  • document: An object (UpdateDocumentInput!) that contains the details of the properties you want to update in the document.

Next, you’ll need to assign values to the variables declared in the mutation using a JSON structure. Example of variable values for the mutation:

UpdateDocumentInput:

The following table describes the fields that can be included in the UpdateDocumentInput object.

Field
Type
Description

name

String

The new name for your document

message

String

A custom message that will be sent to the signers' email addresses.

reminder

'DAILY' | 'WEEKLY'

Defines the frequency of e-mail reminders

refusable

Boolean

If true, allows the signers to refuse to sign a document.

ignore_cpf

Boolean

Removes the requirement to provide a CPF (Brazilian ID number) to sign.

stop_on_rejected

Boolean

Prevents others from signing if the document has been declined.

scrolling_required

Boolean

Only allows signing if the signer has viewed all pages of the document.

sortable

Boolean

Signers must sign in the order defined in the "signers" array.

new_signature_style

Boolean

If true, enables the use of an updated signature style.

show_audit_page

Boolean

Prevents the creation of the final audit page.

Requires "new_signature_style": true

expiration

Sends an expiration reminder to the signers.

footer

'BOTTOM' | 'LEFT' | 'RIGHT'

Defines the position of the footer in the document.

cc

[ String! ]

Sends an email notification when the document is signed by all signers.

configs

Other document settings.

deadline_at

String

Date in ISO 8601 format, such as "YYYY-MM-DDTHH:MM:SS.SSSZ".

The deadline for signing the document.

ExpirationInput

Object within UpdateDocumentInput that contains information about the document’s expiration.

Field
Type
Description

days_before

Int!

Number of days before expiration to send the notification.

notify_at

Date!

Document expiration date.

DocumentConfigInput

Sub-object within UpdateDocumentInput for additional settings.

Field
Type
Description

notification_finished

Boolean

Enables document completion notification

notification_signed

Boolean

Sends an email to the signer when they sign

signature_appearance

'DRAW' | 'HANDWRITING' | 'ELETRONIC' | 'IMAGE'

Forces the appearance of signatures to match the selected option

lock_user_data

Boolean

Does not update user data

circle-info

You can check what each of these parameters means directly in the full GraphQL API documentation, in the Docs menu of Altairarrow-up-right. If you're not sure how to do that, check out our tutorial on Using Altair.

circle-info

If Altair doesn't help you integrate with the API, check out some examples of how to make these requests in other ways: https://graphql.org/graphql-js/graphql-clients/arrow-up-right

Last updated