How to link to us

Want to help people contact their elected representatives from your own website? Add a WriteToThem postcode box with the builder below, or — if you already know someone’s details — link them straight into a pre-filled form from your own code. For example, you could:

  • add a “write to your MP” box to a campaign page;
  • put a “find your local councillor” box on an MP’s own website, to help people reach the right person;
  • send newsletter readers straight to a form to write to their MP.

If you’re running a campaign, please read the guidelines for campaigners first: you must not ask people to send pre-written, identical letters, as they are against our conditions of use and we will block them.

Add a form to your site

Add a WriteToThem postcode box to your own page. Choose who it should reach and what it should say, then copy the snippet below.

Paste this into your page
<wtt-postcode-box>
  <form action="https://www.writetothem.com/" method="get">
    <input name="pc" placeholder="Your postcode" autocomplete="postal-code" required>
    <button type="submit">Go</button>
  </form>
</wtt-postcode-box>
<script async src="https://www.writetothem.com/static/js/postcode-embed.js"></script>

The simplest way to send people to WriteToThem is a plain link. Pick a representative type below to build one:

If you already know something about the person — their postcode, or their name and email, perhaps because they are signed in or you are sending them a newsletter — you can pre-fill the form and skip steps. Every option is just a query-string parameter on https://www.writetothem.com/, and you can combine as many as you like.

Skip the postcode step by passing a postcode you already hold (URL-encode the space as + or %20):

Straight to the results for a postcode
https://www.writetothem.com/?pc=SW1A+1AA

Pre-fill their name and contact details, and note where the link came from. People always see and can edit everything before anything is sent:

Fully pre-filled
https://www.writetothem.com/?pc=SW1A+1AA&a=westminstermp&writer_name=Ann+Example&writer_email=ann@example.org&fyr_extref=https://www.example.org/

Skip the “What is your message about?” question by saying up front what kind of message it is with message_type. Its values are casework (help with a personal problem), campaigning (about a policy or campaign) or other:

Straight to writing a campaign message
https://www.writetothem.com/?pc=SW1A+1AA&a=westminstermp&message_type=campaigning

The parameters you can pass:

  • pc — postcode; sends people straight past the postcode search
  • a — representative type filter (see the dropdown above for values)
  • fyr_extref — the web address of the page you’re linking from, so we can see where messages came from
  • message_typecasework, campaigning or other; skips the “What is your message about?” question
  • writer_name
  • writer_address1
  • writer_address2
  • writer_town
  • writer_county
  • writer_email
  • writer_phone

Remember to URL-encode each value. For the Welsh-language site, use cy.writetothem.com in place of www.writetothem.com.