{"openapi":"3.0.3","info":{"title":"GetMyMFA Programmatic API [Pro & Enterprise plans] - OpenAPI 3.0","description":"This is the GetMyMFA programmatic API documentation based on the OpenAPI 3.0 specification.\n\nThis API is accessible only with the Pro and Enterprise plans and a GetMyMFA account. It was built with the main objective of replicating the behavior that you can experience from the web interface. If you do not have an account, feel free to create one at [https://get.mymfa.io](https://get.mymfa.io).\n\nThe GetMyMFA programmatic API can be used to integrate Multi-Factor Authentication to End-To-End tests or Continuous Integration / Continuous Delivery pipeline (CI/CD) workflows.\n\nDoubts about how to use this API or configure your account? All the information is available in our official programmatic API page accessible through your \"API\" section in your GetMyMFA account.\n\nYou can help us improve the API by sharing your feedback with us to our mail email address: hello@mymfa.io.","termsOfService":"https://get.mymfa.io/assets/terms_and_conditions.pdf","contact":{"email":"hello@mymfa.io"},"version":"1.2.0"},"servers":[{"url":"https://programmatic-api.client.get.mymfa.io/v1"}],"tags":[{"name":"phone-numbers","description":"Everything about your phone numbers"},{"name":"phone-number","description":"Access your phone number messages or MFA codes"},{"name":"email-addresses","description":"Everything about your virtual email addresses"},{"name":"email-address","description":"Access your email address messages or MFA codes"}],"paths":{"/phone-numbers":{"get":{"tags":["phone-numbers"],"summary":"[Pro & Enterprise] Get your phone numbers","description":"Retrieve the list of phone numbers that you have purchased","operationId":"GetPurchasedPhoneNumbers","parameters":[{"name":"x-api-key","in":"header","description":"Your programmatic API Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/  json":{"schema":{"$ref":"#/components/schemas/PhoneNumbers"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}}},"security":[{"xApiKey":[]}]}},"/{phone_id}/mfa/latest":{"get":{"tags":["phone-number"],"summary":"[Pro & Enterprise] Get last MFA code for given phone number","description":"Given a phone ID, retrieve the last MFA code received (valid).","operationId":"getLastMfaCodeForPhone","parameters":[{"name":"x-api-key","in":"header","description":"Your personal API Key","required":true,"schema":{"type":"string"}},{"name":"phone_id","in":"path","description":"The phone number ID for which you want to retrieve the last MFA code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneMfaCode"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}},"404":{"description":"Phone number not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404"}}}}},"security":[{"xApiKey":[]}]}},"/{phone_id}/message/latest":{"get":{"tags":["phone-number"],"summary":"[Enterprise] Get last full body message for given phone number","description":"ONLY AVAILABLE IN THE ENTERPRISE PLAN - Given a phone ID, retrieve the last full body message  received.","operationId":"getLastMessageForPhone","parameters":[{"name":"x-api-key","in":"header","description":"Your personal API Key","required":true,"schema":{"type":"string"}},{"name":"phone_id","in":"path","description":"The phone number ID for which you want to retrieve the last SMS message","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}},"404":{"description":"Phone number not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404"}}}}},"security":[{"xApiKey":[]}]}},"/email-addresses":{"get":{"tags":["email-addresses"],"summary":"[Pro & Enterprise] Get your email addresses","description":"Retrieve the list of email addresses that you have purchased","operationId":"GetPurchasedEmailAddresses","parameters":[{"name":"x-api-key","in":"header","description":"Your programmatic API Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/  json":{"schema":{"$ref":"#/components/schemas/EmailAddresses"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}}},"security":[{"xApiKey":[]}]}},"/{email_id}/mfa/latest":{"get":{"tags":["email-address"],"summary":"[Pro & Enterprise] Get last MFA code for given email address","description":"Given an email address ID, retrieve the last MFA code received (valid).","operationId":"getLastMfaCodeForEmail","parameters":[{"name":"x-api-key","in":"header","description":"Your personal API Key","required":true,"schema":{"type":"string"}},{"name":"email_id","in":"path","description":"The email address ID for which you want to retrieve the last MFA code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMfaCode"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}},"404":{"description":"Phone number not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404"}}}}},"security":[{"xApiKey":[]}]}},"/{email_id}/message/latest":{"get":{"tags":["email-address"],"summary":"[Enterprise] Get last full body message for email address","description":"ONLY AVAILABLE IN THE ENTERPRISE PLAN - Given an email address ID, retrieve the last full body message  received.","operationId":"getLastMessageForEmail","parameters":[{"name":"x-api-key","in":"header","description":"Your personal API Key","required":true,"schema":{"type":"string"}},{"name":"email_id","in":"path","description":"The phone number ID for which you want to retrieve the last SMS message","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Invalid query provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"403":{"description":"User is not authorized to perform this request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}},"404":{"description":"Phone number not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404"}}}}},"security":[{"xApiKey":[]}]}}},"components":{"schemas":{"PhoneNumbers":{"type":"object","properties":{"count":{"type":"number","example":9},"remainingPurchaseQuota":{"type":"number","example":1},"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}}}},"EmailAddresses":{"type":"object","properties":{"count":{"type":"number","example":9},"remainingPurchaseQuota":{"type":"number","example":1},"emailAddresses":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"}}}},"PhoneNumber":{"type":"object","properties":{"phoneId":{"type":"string","example":"74b05a20-d3f9-4179-9bdc-d93e1c6bca88"},"phoneNumber":{"type":"string","example":"+1123123123"},"country":{"type":"string","example":"United States"},"capabilities":{"type":"array","items":{"type":"string","example":["International","Limited","Numeric","Multi-Sender","Short","Trial"]}}}},"EmailAddress":{"type":"object","properties":{"emailId":{"type":"string","example":"74b05a20-d3f9-4179-9bdc-d93e1c6bca88"},"emailAddress":{"type":"string","example":"b6af7ed@client.get.mymfa.io"}}},"PhoneMfaCode":{"type":"object","properties":{"phoneId":{"type":"string","example":"74b05a20-d3f9-4179-9bdc-d93e1c6bca88"},"phoneNumber":{"type":"string","example":"+1123123123"},"mfaCode":{"type":"string","example":182937},"receivedDate":{"type":"number","example":1672534861},"limitsData":{"type":"object","properties":{"smsLimit":{"type":"number","example":100},"consumptionRate":{"type":"number","example":0.88},"consumptionAmount":{"type":"number","example":88},"periodStart":{"type":"number","example":1707041609},"periodEnd":{"type":"number","example":1709547209}}}}},"EmailMfaCode":{"type":"object","properties":{"emailId":{"type":"string","example":"74b05a20-d3f9-4179-9bdc-d93e1c6bca88"},"emailAddress":{"type":"string","example":"+1123123123"},"mfaCode":{"type":"string","example":182937},"receivedDate":{"type":"number","example":1672534861},"limitsData":{"type":"object","properties":{"smsLimit":{"type":"number","example":100},"consumptionRate":{"type":"number","example":0.88},"consumptionAmount":{"type":"number","example":88},"periodStart":{"type":"number","example":1707041609},"periodEnd":{"type":"number","example":1709547209}}}}},"Message":{"type":"object","properties":{"phoneId":{"type":"string","example":"74b05a20-d3f9-4179-9bdc-d93e1c6bca88"},"phoneNumber":{"type":"string","example":"+1123123123"},"message":{"type":"string","example":"In order to login, please visit https://example.com"},"receivedDate":{"type":"number","example":1672534861},"limitsData":{"type":"object","properties":{"smsLimit":{"type":"number","example":100},"consumptionRate":{"type":"number","example":0.88},"consumptionAmount":{"type":"number","example":88},"periodStart":{"type":"number","example":1707041609},"periodEnd":{"type":"number","example":1709547209}}}}},"Error400":{"type":"object","properties":{"message":{"type":"string","example":"Malformed request"}}},"Error403":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"}}},"Error404":{"type":"object","properties":{"message":{"type":"string","example":"Not found"}}}},"securitySchemes":{"xApiKey":{"type":"apiKey","name":"x-api-key","in":"header"}}}}