Skip to content

Connecting your own contact form to Mimir

Connect your website’s contact form to Mimir’s API to turn submissions into tickets. You’ll need a developer or a form platform that can send authenticated requests securely from its servers.

1. Create an API key

  1. Go to Settings → API keys in Mimir.
  2. Create a key named something like Website contact form, with only the tickets:create permission.
  3. Copy the secret immediately—it is shown only once—and store it securely on your backend.

If you cannot manage API keys, ask a company admin. Never include the key in your website’s HTML or browser JavaScript. Revoke and replace it if it is lost or exposed.

2. Find your channel ID

Open the destination channel under Settings → Channels. Copy the ID from its settings URL: /settings/channels/CHANNEL_ID. Use this ID, not the channel’s name or email address.

3. Send form submissions to Mimir

Send submissions through your backend, not directly from the visitor’s browser. Your backend should validate the input and send a POST request to:

https://api.trymimir.com/external-api/v1/tickets

Include these headers:

  • Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

Replace YOUR_API_KEY with your stored secret. Send a JSON body with these fields:

Field Value
subject Required. A non-empty subject entered by the visitor or set by your backend.
body Required. A non-empty message. Include extra form details, such as a name or order number, here.
customer_email Required. The visitor’s valid email address.
channel_id Required. Your destination channel’s ID.
tag_ids Optional. An array of tag UUIDs, not tag names.

See the Create Ticket API reference for copyable request examples in your preferred language.

4. Test the connection

Submit a test and check that the ticket appears in the correct Mimir channel with the expected details.

  • 201: Ticket created. The response includes its ticket_id. You can now show the visitor a success message.
  • 422: Validation failed. Check the response details and your submitted fields.
  • Authentication failure: Check that the key is active, has tickets:create permission and is sent as a bearer token.

Before going live, add spam protection and prevent duplicate submissions. Be careful retrying timed-out requests: the ticket may already have been created.