Adding a signer

How to add a signer to an already created document

To add a signer to a document, you can use the following mutation.

Mutation definition:

Here is the mutation definition for adding a signer:

mutation(
  $document_id: UUID!,
  $signer: SignerInput
) {
  createSigner(
    document_id: $document_id 
    signer: $signer
  ) {
    public_id
    name
    email
    delivery_method
    action { name }
    link {
      id
      short_link 
    }
    created_at
  }
}

Parameters:

  • document_id: The unique identifier of the document to which you want to add a signer.

  • signer: Contains the details of the signer being added. This object requires careful attention to both required and optional fields, as defined in our SignerInput specification.

After defining the mutation, you need to assign values to the declared variables using a JSON object.

{
  "document_id": "ID_DO_DOCUMENTO",
    "signer": { 
      "email": "[email protected]",
      "action": "SIGN"
    }
}

Remember to replace the placeholder values by providing the document ID and signer information, which are the same as those mentioned in:Creating a document.

Expected response:The response will include details about the created signer, as defined in the mutation. Here is an example of the expected response:

{
  "data": {
    "createSigner": {
      "public_id": "434fcd4c6d0c11eea3c542010a2b60c6",
      "name": null,
      "email": "[email protected]",
      "delivery_method": "DELIVERY_METHOD_EMAIL",
      "action": {
        "name": "SIGN"
      },
      "link": null,
      "created_at": "2023-10-17T16:43:13.000000Z"
    }
  }
}

The link field will provide the signing URL for the signer, if they were added using the parameter "delivery_method": "DELIVERY_METHOD_LINK".

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

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/

Last updated

Was this helpful?