# Adding a signer

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

**Mutation definition:**

Here is the mutation definition for adding a signer:

```graphql
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**.

```json
{
  "document_id": "DOCUMENT_ID",
    "signer": { 
      "email": "change-this-email-that-is-also-public@tuamaeaquelaursa.com",
      "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](/api/mutations/criando-um-documento.md).

#### Expected response: the response will include details about the created signer, as defined in the mutation.

#### &#x20;Here is an example of the expected response:

```json
{
  "data": {
    "createSigner": {
      "public_id": "434fcd4c6d0c11eea3c542010a2b60c6",
      "name": null,
      "email": "change-this-email-that-is-also-public@tuamaeaquelaursa.com",
      "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"`.

{% hint style="info" %}
You can check what each of these parameters means directly in the full GraphQL API documentation, in the Docs menu of [Altair](https://altair.autentique.com.br/). If you're not sure how to do that, check out our tutorial on [**Using Altair**](/api/integration-basics/altair.md).
{% endhint %}

{% hint style="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/>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autentique.com.br/api/mutations/adding-a-signer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
