Instrument of Accession
The Instrument of Accession was a legal document first introduced by the Government of India Act 1935 and used in 1947 to enable each of the rulers of the princely states under British paramountcy to join one of the new dominions of India or Pakistan created by the Partition of British India. The instruments of accession executed by the rulers, provided for the accession of states to the Dominion of India (or Pakistan) on three subjects, namely, defence, external affairs and communications. Background

565 princely states existed in India during the British Raj. These were not parts of British India, having never become possessions of the British Crown, but were tied to the Crown by various treaties and were under the suzerainty of the Crown. British India and the princely states were together referred to as the "Indian Empire", commonly called "India". The Government of India Act 1935 introduced the concept of the Instrument of Accession, wherein a ruler of a princely state could accede his kingdom into the 'Federation of India'. The federation concept was initially opposed by the Indian princes, but it is believed that they came around to its acceptance by the beginning of World War II. In 1947, the British finalised their plans for leaving India, and the question of the future of the princely states was a conundrum for them. As they were not British possessions, they could not be partitioned by the British between the new sovereign dominions of India and Pakistan. The Indian Independence Act 1947 provided that the suzerainty of the British Crown over the princely states would simply be terminated, effective 15 August 1947. That would leave the princely states completely independent, even though many of them had been dependent on the Government of India for defence, finance, and other infrastructure. With independence, it would then be a matter for each ruler of a state to decide whether to accede to India or Pakistan, independence for princely states ruled out—they would join either India or Pakistan. Standard template 
A standard form was used:

Accession of states to the new Dominions
The Instrument of Accession was the legal document designed to bring about accession, where a ruler had decided upon it. It was executed by the rulers of each of the princely states, individually, on the one hand, but took effect only if then accepted by the Government of India or the Government of Pakistan. Among the more momentous of such accessions was that concerning Jammu and Kashmir, as executed on 26 October 1947 by Maharaja Hari Singh, ruler of Jammu and Kashmir. It gave control of the defence and external relations of the state to the government of India. The accession of Jammu and Kashmir was accepted by Lord Mountbatten of Burma, Governor-General of India, on 27 October 1947. 