---
title: "Generate an Electronic Signature of a Document"
method: POST
path: "/v2/accounts/{accountid}/documents/{documentid}/signinit"
tags: ["Accounts | Admin"]
---

# Generate an Electronic Signature of a Document

`POST /v2/accounts/{accountid}/documents/{documentid}/signinit`

This call lets you to generate an electronic signature.  

**Note:** Only SDD mandates can be signed with this method.      

**Prerequisite:**  A Mandate needs to be registered with **RegisterSddMandate**

1. A call to `SignDocumentInit` of DirectKit to make the signature request and get a token.  
2. A redirection from your website to the WebKit, with the token in GET parameter (see Finalize document signature).  
3. A return page where your user will be redirected after the signature.

## Path parameters

- `accountid` string, required
- `documentid` integer, required

## Headers

- `Authorization` string, required
- `PSU-Accept-Language` string
- `PSU-IP-Address` string, required
- `PSU-User-Agent` string

## Request body

- SignDocumentInitInput
  - `mobileNumber` string — Required if no mobile number is already assigned to the payment account (using RegisterWallet or UpdateWalletDetails). Format must be MSISDN : international number with country code, without "+" and "00".
  - `type` integer — Use **21** for SDD mandate
  - `returnUrl` string — Your website will the return URL, called by WEBKIT to terminate the operation.
  - `errorUrl` string — You site will return the URL, called by WEBKIT in case of an error.

## Response `200`

OK

- SignDocumentInitOutput
  - `signDocument` string — Payment token to use as GET parameter when redirecting your user to the WEBKIT. so even if the user comes back to your error page (if the user cancelled for example), you can still submit the same token to the WEBKIT.
  - `error` Error
    - `code` integer
    - `message` string
    - `psp` PSP
      - `message` string — Get the Error Message from PSP

## Other responses

- `401` — Unauthorized
- `500` — InternalServerError

---

[API](https://skmtc.net/lemonway/apis/account-onboarding-management-api.md) · [All operations](https://skmtc.net/lemonway/apis/account-onboarding-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lemonway/account-onboarding-management-api/versions/73309fe68e2d/schema)
