{"_id":"592300b2b90d7919007e652f","version":{"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","__v":31,"createdAt":"2014-10-03T16:17:14.165Z","releaseDate":"2014-10-03T16:17:14.165Z","categories":["542ecc0a6b0eb6080066ca78","542ef44f6b0eb6080066cb24","543bf3e22a30961a00b66eb3","5446952b82bd7e08002768a0","544821ae8d7af31a00dd41ce","544a7885f1aefa08006efc69","544c758e11845f0e001ed8de","544e5565b80812080035be55","544e558dbd51b9080037f8ca","5450b045a66f020800dba73d","5450eb6aa66f020800dba945","5450f39ea66f020800dba989","5450f877a66f020800dba9cf","54510356a66f020800dbaa17","5451274514af501a00b50c99","54513345a66f020800dbab24","54513cc014af501a00b50d24","54515eec14af501a00b50db9","54519b1d14af501a00b50ea9","54519b2aa66f020800dbacb4","54524f9704160008005b1d27","54538d2308d1800800473d95","54538d420c09721000a06a03","54538e5608d1800800473d9a","5453ea9547c30114004fb375","5453eb12b077c31c00067bcb","5453eb27b077c31c00067bcd","5453ed5db077c31c00067bde","548075cbe291c51a00e7e096","5922fa475c48c70f00f21453","59244fd41e32eb190028ad8d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"__v":4,"category":{"_id":"5922fa475c48c70f00f21453","project":"542dbe0ecb19820800c1f4d7","__v":0,"version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-22T14:48:39.232Z","from_sync":false,"order":4,"slug":"mms","title":"MMS"},"project":"542dbe0ecb19820800c1f4d7","parentDoc":null,"user":"542dbdddcb19820800c1f4d6","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-22T15:16:02.983Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSID}/MMS/Messages' -u '{AccountSID}:{AuthToken}' -d 'From=19082894888&To=19082894801&Body=This is an MMS!&MediaUrl=https://tinyurl.com/mmlhqmt'","language":"curl"}]},"method":"post","results":{"codes":[{"name":"Success","code":"","language":"json"}]},"settings":"","auth":"required","params":[{"_id":"5446970f3168910800744dab","ref":"","in":"body","required":false,"desc":"Must be a Zang number associated with your account. The value does not have to be in any specific format.","default":"","type":"string","name":"From"},{"_id":"5446970f3168910800744dac","ref":"","in":"body","required":false,"desc":"Must be an MMS capable number. The value does not have to be in any specific format.","default":"","type":"string","name":"To"},{"_id":"5446970f3168910800744daa","ref":"","in":"body","required":false,"desc":"Text of the MMS to be sent.","default":"","type":"string","name":"Body"},{"_id":"59230d7418ed1a0f00fc9fcd","ref":"","in":"body","required":false,"desc":"The URL of the media you wish to send out with the message. Please see below for supported content.","default":"","type":"string","name":"MediaUrl"},{"_id":"5446970f3168910800744da9","ref":"","in":"body","required":false,"desc":"The URL that will be sent information about the MMS. Url length is limited to 200 characters.","default":"","type":"string","name":"StatusCallback"},{"_id":"5446970f3168910800744da8","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.","default":"POST","type":"string","name":"StatusCallbackMethod"},{"_id":"54d28d742ce0e00d00751579","ref":"","in":"body","required":false,"desc":"If the Body length is greater than 160 characters, the MMS will be sent as a multi-part MMS. Allowed values are True or False.","default":"False","type":"string","name":"AllowMultiple"}],"url":"/v2/Accounts/{AccountSid}/MMS/Messages"},"isReference":false,"order":2,"body":"With MMS, you will have the ability to share audio, images, and video with MMS-capable numbers in the US & Canada. The API setup is very similar to SMS. MMS will come automatically enabled when a phone number is purchased.\n[block:api-header]\n{\n  \"title\": \"Request URL\"\n}\n[/block]\nThe HTTP POST method is used to request this resource.\n\n`https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages` - for XML responses\n`https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages.json` - for JSON responses \n`https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages.csv` - for CSV responses\n\n# Required Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"From\",\n    \"1-0\": \"To\",\n    \"2-0\": \"MediaUrl\",\n    \"0-1\": \"Must be a Zang number associated with your account. The value does not have to be in any specific format.\",\n    \"1-1\": \"Must be an MMS capable number. The value does not have to be in any specific format.\",\n    \"2-1\": \"The URL of the media you wish to send out with the message. Please see below for supported content.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n# Optional Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"StatusCallback\",\n    \"1-1\": \"The URL that will be sent information about the MMS. URL length is limited to 200 characters.\",\n    \"2-0\": \"StatusCallbackMethod\",\n    \"2-1\": \"The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.\",\n    \"0-0\": \"Body\",\n    \"0-1\": \"Text of the MMS to be sent.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n# cURL Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSID}/MMS/Messages' -u '{AccountSID}:{AuthToken}' -d 'From=+19082894888&To=+19082894801&Body=You cant triple stamp a double stamp!' -d \\\"MediaUrl=https://tinyurl.com/lpewlmo\\\"\",\n      \"language\": \"curl\",\n      \"name\": \"cURL\"\n    }\n  ]\n}\n[/block]\n# XML Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<Response>\\n    <MmsMessage>\\n        <Status>Sent</Status>\\n        <MmsSid>{Sid}</MmsSid>\\n        <AccountSid>{AccountSid}</AccountSid>\\n        <From>+19082894888</From>\\n        <To>+19082894801</To>\\n        <Body>You can't triple stamp a double stamp!</Body>\\n        <DateCreated>2017-05-22T20:48:15+0000</DateCreated>\\n        <DateUpdated></DateUpdated>\\n        <DateSent>2017-05-22T20:48:22+0000</DateSent>\\n        <MediaUrl>https://tinyurl.com/lpewlmo</MediaUrl>\\n        <Price>0.02</Price>\\n        <Direction>outbound</Direction>\\n        <ApiVersion>v2</ApiVersion>\\n    </MmsMessage>\\n</Response>\",\n      \"language\": \"xml\",\n      \"name\": \"XML\"\n    }\n  ]\n}\n[/block]\n#JSON Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"Sent\\\",\\n  \\\"mms_sid\\\": \\\"{Sid}\\\",\\n  \\\"account_sid\\\": \\\"{AccountSid}\\\",\\n  \\\"from\\\": \\\"+19082894888\\\",\\n  \\\"to\\\": \\\"+19082894801\\\",\\n  \\\"body\\\": \\\"You can't triple stamp a double stamp!\\\",\\n  \\\"date_created\\\": \\\"2017-05-22T20:51:39+0000\\\",\\n  \\\"date_sent\\\": \\\"2017-05-22T20:51:46+0000\\\",\\n  \\\"media_url\\\": \\\"https://tinyurl.com/lpewlmo\\\",\\n  \\\"price\\\": \\\"0.02\\\",\\n  \\\"direction\\\": \\\"outbound\\\",\\n  \\\"apiVersion\\\": \\\"v2\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]\n#CSV Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Status,MmsSid,AccountSid,From,To,Body,DateCreated,DateUpdated,DateSent,MediaUrl,Price,Direction,ApiVersion\\nSent,{Sid},{AccountSid},+19082894888,+19082894801,You can't triple stamp a double stamp!,2017-05-22T12:44:13+0000,,2017-05-22T12:44:20+0000,https://tinyurl.com/lpewlmo,0.02,outbound,v2\",\n      \"language\": \"text\",\n      \"name\": \"CSV\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Audio: amr, mp3, wav\\nImages: jpg, gif, png\\nVideo: mp4, avi, flv\\n\\nThe media size limit is 5MB. We do not support sending more than one media file in the message body at this time. MMS is currently only supported in the US and Canada.\",\n  \"title\": \"Supported Content Media Types\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Need Help?\",\n  \"body\": \"If you run into any issues, feel free to contact our support team: support:::at:::zang.io.\"\n}\n[/block]","excerpt":"","slug":"send-mms-1","type":"basic","title":"Send MMS"}
With MMS, you will have the ability to share audio, images, and video with MMS-capable numbers in the US & Canada. The API setup is very similar to SMS. MMS will come automatically enabled when a phone number is purchased. [block:api-header] { "title": "Request URL" } [/block] The HTTP POST method is used to request this resource. `https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages` - for XML responses `https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages.json` - for JSON responses `https://api.zang.io/v2/Accounts/{AccountSid}/MMS/Messages.csv` - for CSV responses # Required Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "From", "1-0": "To", "2-0": "MediaUrl", "0-1": "Must be a Zang number associated with your account. The value does not have to be in any specific format.", "1-1": "Must be an MMS capable number. The value does not have to be in any specific format.", "2-1": "The URL of the media you wish to send out with the message. Please see below for supported content." }, "cols": 2, "rows": 3 } [/block] # Optional Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "1-0": "StatusCallback", "1-1": "The URL that will be sent information about the MMS. URL length is limited to 200 characters.", "2-0": "StatusCallbackMethod", "2-1": "The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.", "0-0": "Body", "0-1": "Text of the MMS to be sent." }, "cols": 2, "rows": 3 } [/block] # cURL Example [block:code] { "codes": [ { "code": "curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSID}/MMS/Messages' -u '{AccountSID}:{AuthToken}' -d 'From=+19082894888&To=+19082894801&Body=You cant triple stamp a double stamp!' -d \"MediaUrl=https://tinyurl.com/lpewlmo\"", "language": "curl", "name": "cURL" } ] } [/block] # XML Response [block:code] { "codes": [ { "code": "<Response>\n <MmsMessage>\n <Status>Sent</Status>\n <MmsSid>{Sid}</MmsSid>\n <AccountSid>{AccountSid}</AccountSid>\n <From>+19082894888</From>\n <To>+19082894801</To>\n <Body>You can't triple stamp a double stamp!</Body>\n <DateCreated>2017-05-22T20:48:15+0000</DateCreated>\n <DateUpdated></DateUpdated>\n <DateSent>2017-05-22T20:48:22+0000</DateSent>\n <MediaUrl>https://tinyurl.com/lpewlmo</MediaUrl>\n <Price>0.02</Price>\n <Direction>outbound</Direction>\n <ApiVersion>v2</ApiVersion>\n </MmsMessage>\n</Response>", "language": "xml", "name": "XML" } ] } [/block] #JSON Response [block:code] { "codes": [ { "code": "{\n \"status\": \"Sent\",\n \"mms_sid\": \"{Sid}\",\n \"account_sid\": \"{AccountSid}\",\n \"from\": \"+19082894888\",\n \"to\": \"+19082894801\",\n \"body\": \"You can't triple stamp a double stamp!\",\n \"date_created\": \"2017-05-22T20:51:39+0000\",\n \"date_sent\": \"2017-05-22T20:51:46+0000\",\n \"media_url\": \"https://tinyurl.com/lpewlmo\",\n \"price\": \"0.02\",\n \"direction\": \"outbound\",\n \"apiVersion\": \"v2\"\n}", "language": "json", "name": "JSON" } ] } [/block] #CSV Response [block:code] { "codes": [ { "code": "Status,MmsSid,AccountSid,From,To,Body,DateCreated,DateUpdated,DateSent,MediaUrl,Price,Direction,ApiVersion\nSent,{Sid},{AccountSid},+19082894888,+19082894801,You can't triple stamp a double stamp!,2017-05-22T12:44:13+0000,,2017-05-22T12:44:20+0000,https://tinyurl.com/lpewlmo,0.02,outbound,v2", "language": "text", "name": "CSV" } ] } [/block] [block:callout] { "type": "warning", "body": "Audio: amr, mp3, wav\nImages: jpg, gif, png\nVideo: mp4, avi, flv\n\nThe media size limit is 5MB. We do not support sending more than one media file in the message body at this time. MMS is currently only supported in the US and Canada.", "title": "Supported Content Media Types" } [/block] [block:callout] { "type": "info", "title": "Need Help?", "body": "If you run into any issues, feel free to contact our support team: [email protected]" } [/block]