🌐
English

CURL Documentation

Use these CURL commands to interact directly with the Tigrmail API. All requests require authentication via Bearer token.

List Domains

List the inbox domains available for your account.

curl -X GET https://api.tigrmail.com/v1/domains \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "domains": [
    "den.tigrmail.com"
  ]
}

Create Inbox

Create an inbox (email address) that you can use to send emails to from your app. Only you have access to your inboxes and only you can receive messages from them. It's ok to create a new inbox for each new test run.

curl -X POST https://api.tigrmail.com/v1/inboxes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "inbox": "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
}

Create Inbox with a Domain

Create an inbox on a specific available domain.

curl -X POST \ "https://api.tigrmail.com/v1/inboxes?domain=den.tigrmail.com" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "inbox": "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
}

Customize Your Inbox Email

Enter your inbox email address from the "Create Inbox" response above to automatically update all the polling examples below.

Poll Next Message (Basic)

Poll the next email message for the given inbox. The message gets automatically marked as received and will not be returned in future calls. If no message arrives within 3 minutes, an error will be returned.

curl -X GET \ "https://api.tigrmail.com/v1/messages" \ -G \ -d "inbox=ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "message": {
    "to": [
      "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
    ],
    "from": "no-reply@yourapp.com",
    "subject": "Verification Code",
    "body": "Use this code to confirm your sign-up: 918642"
  }
}

Poll Message with Subject Filter

Poll for messages with a specific subject (case insensitive match).

curl -X GET \ "https://api.tigrmail.com/v1/messages" \ -G \ -d "inbox=ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com" \ -d "subjectEquals=Verification Code" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "message": {
    "to": [
      "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
    ],
    "from": "no-reply@yourapp.com",
    "subject": "Verification Code",
    "body": "Use this code to confirm your sign-up: 918642"
  }
}

Poll Message with Subject Contains

Poll for messages that contain a substring in the subject (case insensitive).

curl -X GET \ "https://api.tigrmail.com/v1/messages" \ -G \ -d "inbox=ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com" \ -d "subjectContains=Verification" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "message": {
    "to": [
      "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
    ],
    "from": "no-reply@yourapp.com",
    "subject": "Verification Code",
    "body": "Use this code to confirm your sign-up: 918642"
  }
}

Poll Message from Specific Email

Poll for messages only from a specified sender email address.

curl -X GET \ "https://api.tigrmail.com/v1/messages" \ -G \ -d "inbox=ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com" \ -d "fromEmail=no-reply@yourapp.com" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "message": {
    "to": [
      "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
    ],
    "from": "no-reply@yourapp.com",
    "subject": "Verification Code",
    "body": "Use this code to confirm your sign-up: 918642"
  }
}

Poll Message from Specific Domain

Poll for messages only from a specified sender domain.

curl -X GET \ "https://api.tigrmail.com/v1/messages" \ -G \ -d "inbox=ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com" \ -d "fromDomain=yourapp.com" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Example Response

{
  "message": {
    "to": [
      "ornery-pixie-bob-f6m0fysfa212cnvr242r@den.tigrmail.com"
    ],
    "from": "no-reply@yourapp.com",
    "subject": "Verification Code",
    "body": "Use this code to confirm your sign-up: 918642"
  }
}