GetMyMFA
/Docs · REST API v1.2.0

API reference.

Base URL https://programmatic-api.client.get.mymfa.io/v1. Authenticate every call with your API key in the x-api-key header. Available on the Pro and Enterprise plans.

Authentication

Every request is a plain HTTPS GET against https://programmatic-api.client.get.mymfa.io/v1, authenticated with the API key from the API section of your GetMyMFA console in the x-api-key header. The API is available on the Pro and Enterprise plans; the two full-message endpoints are Enterprise only. Error responses are JSON objects with a single message field.

curl "https://programmatic-api.client.get.mymfa.io/v1/phone-numbers" \
  -H "x-api-key: <your-api-key>"
EndpointReturnsPlan
GET /phone-numbersGet your phone numbersPro & Enterprise
GET /{phone_id}/mfa/latestGet last MFA code for given phone numberPro & Enterprise
GET /{phone_id}/message/latestGet last full body message for given phone numberEnterprise
GET /email-addressesGet your email addressesPro & Enterprise
GET /{email_id}/mfa/latestGet last MFA code for given email addressPro & Enterprise
GET /{email_id}/message/latestGet last full body message for email addressEnterprise

Everything about your phone numbers

GET/phone-numbersPro & Enterprise

Get your phone numbers

Retrieve the list of phone numbers that you have purchased

Parameters

NameInDescription
x-api-keyrequiredheaderYour programmatic API Key

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/phone-numbers" \
  -H "x-api-key: <your-api-key>"

Responses

Example 200 response

{
  "count": 9,
  "remainingPurchaseQuota": 1,
  "phoneNumbers": [
    {
      "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
      "phoneNumber": "+1123123123",
      "country": "United States",
      "capabilities": [
        "International",
        "Limited"
      ]
    }
  ]
}

Access your phone number messages or MFA codes

GET/{phone_id}/mfa/latestPro & Enterprise

Get last MFA code for given phone number

Given a phone ID, retrieve the last MFA code received (valid).

Parameters

NameInDescription
x-api-keyrequiredheaderYour personal API Key
phone_idrequiredpathThe phone number ID for which you want to retrieve the last MFA code

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/<phone_id>/mfa/latest" \
  -H "x-api-key: <your-api-key>"

Responses

Example 200 response

{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "mfaCode": "182937",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}
GET/{phone_id}/message/latestEnterprise

Get last full body message for given phone number

Given a phone ID, retrieve the last full body message received.

Parameters

NameInDescription
x-api-keyrequiredheaderYour personal API Key
phone_idrequiredpathThe phone number ID for which you want to retrieve the last SMS message

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/<phone_id>/message/latest" \
  -H "x-api-key: <your-api-key>"

Responses

  • 200Success · Message
  • 400Invalid query provided · Error400
  • 403User is not authorized to perform this request · Error403
  • 404Phone number not found · Error404

Example 200 response

{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "message": "In order to login, please visit https://example.com",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}

Everything about your virtual email addresses

GET/email-addressesPro & Enterprise

Get your email addresses

Retrieve the list of email addresses that you have purchased

Parameters

NameInDescription
x-api-keyrequiredheaderYour programmatic API Key

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/email-addresses" \
  -H "x-api-key: <your-api-key>"

Responses

Example 200 response

{
  "count": 9,
  "remainingPurchaseQuota": 1,
  "emailAddresses": [
    {
      "emailId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
      "emailAddress": "b6af7ed@client.get.mymfa.io"
    }
  ]
}

Access your email address messages or MFA codes

GET/{email_id}/mfa/latestPro & Enterprise

Get last MFA code for given email address

Given an email address ID, retrieve the last MFA code received (valid).

Parameters

NameInDescription
x-api-keyrequiredheaderYour personal API Key
email_idrequiredpathThe email address ID for which you want to retrieve the last MFA code

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/<email_id>/mfa/latest" \
  -H "x-api-key: <your-api-key>"

Responses

Example 200 response

{
  "emailId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "emailAddress": "+1123123123",
  "mfaCode": "182937",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}
GET/{email_id}/message/latestEnterprise

Get last full body message for email address

Given an email address ID, retrieve the last full body message received.

Parameters

NameInDescription
x-api-keyrequiredheaderYour personal API Key
email_idrequiredpathThe phone number ID for which you want to retrieve the last SMS message

Request

curl -X GET "https://programmatic-api.client.get.mymfa.io/v1/<email_id>/message/latest" \
  -H "x-api-key: <your-api-key>"

Responses

  • 200Success · Message
  • 400Invalid query provided · Error400
  • 403User is not authorized to perform this request · Error403
  • 404Phone number not found · Error404

Example 200 response

{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "message": "In order to login, please visit https://example.com",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}

Schemas

Response bodies. Dates are Unix timestamps in seconds; limitsData describes the SMS quota of the current billing period.

›PhoneNumbers
FieldTypeExample
countnumber9
remainingPurchaseQuotanumber1
phoneNumbersarray of PhoneNumber
{
  "count": 9,
  "remainingPurchaseQuota": 1,
  "phoneNumbers": [
    {
      "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
      "phoneNumber": "+1123123123",
      "country": "United States",
      "capabilities": [
        "International",
        "Limited"
      ]
    }
  ]
}
›EmailAddresses
FieldTypeExample
countnumber9
remainingPurchaseQuotanumber1
emailAddressesarray of EmailAddress
{
  "count": 9,
  "remainingPurchaseQuota": 1,
  "emailAddresses": [
    {
      "emailId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
      "emailAddress": "b6af7ed@client.get.mymfa.io"
    }
  ]
}
›PhoneNumber
FieldTypeExample
phoneIdstring74b05a20-d3f9-4179-9bdc-d93e1c6bca88
phoneNumberstring+1123123123
countrystringUnited States
capabilitiesarray of stringInternational, Limited, Numeric, Multi-Sender, Short, Trial
{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "country": "United States",
  "capabilities": [
    "International",
    "Limited"
  ]
}
›EmailAddress
FieldTypeExample
emailIdstring74b05a20-d3f9-4179-9bdc-d93e1c6bca88
emailAddressstringb6af7ed@client.get.mymfa.io
{
  "emailId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "emailAddress": "b6af7ed@client.get.mymfa.io"
}
›PhoneMfaCode
FieldTypeExample
phoneIdstring74b05a20-d3f9-4179-9bdc-d93e1c6bca88
phoneNumberstring+1123123123
mfaCodestring182937
receivedDatenumber1672534861
limitsDataobject
limitsData.smsLimitnumber100
limitsData.consumptionRatenumber0.88
limitsData.consumptionAmountnumber88
limitsData.periodStartnumber1707041609
limitsData.periodEndnumber1709547209
{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "mfaCode": "182937",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}
›EmailMfaCode
FieldTypeExample
emailIdstring74b05a20-d3f9-4179-9bdc-d93e1c6bca88
emailAddressstring+1123123123
mfaCodestring182937
receivedDatenumber1672534861
limitsDataobject
limitsData.smsLimitnumber100
limitsData.consumptionRatenumber0.88
limitsData.consumptionAmountnumber88
limitsData.periodStartnumber1707041609
limitsData.periodEndnumber1709547209
{
  "emailId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "emailAddress": "+1123123123",
  "mfaCode": "182937",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}
›Message
FieldTypeExample
phoneIdstring74b05a20-d3f9-4179-9bdc-d93e1c6bca88
phoneNumberstring+1123123123
messagestringIn order to login, please visit https://example.com
receivedDatenumber1672534861
limitsDataobject
limitsData.smsLimitnumber100
limitsData.consumptionRatenumber0.88
limitsData.consumptionAmountnumber88
limitsData.periodStartnumber1707041609
limitsData.periodEndnumber1709547209
{
  "phoneId": "74b05a20-d3f9-4179-9bdc-d93e1c6bca88",
  "phoneNumber": "+1123123123",
  "message": "In order to login, please visit https://example.com",
  "receivedDate": 1672534861,
  "limitsData": {
    "smsLimit": 100,
    "consumptionRate": 0.88,
    "consumptionAmount": 88,
    "periodStart": 1707041609,
    "periodEnd": 1709547209
  }
}
›Error400
FieldTypeExample
messagestringMalformed request
{
  "message": "Malformed request"
}
›Error403
FieldTypeExample
messagestringUnauthorized
{
  "message": "Unauthorized"
}
›Error404
FieldTypeExample
messagestringNot found
{
  "message": "Not found"
}