Fazer upload de mídia
curl --request POST \
--url https://app.reinvented.education/api/v1/communications/media/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'name=<string>'import requests
url = "https://app.reinvented.education/api/v1/communications/media/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://app.reinvented.education/api/v1/communications/media/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"url_pk": 2207,
"media": "image",
"url": "https://cdn.example.com/media/promo.png",
"name": "promo.png"
}{
"email": [
"Enter a valid email address."
],
"selected_days": [
"Day funday is not valid."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "<string>"
}Comunicações
Fazer upload de mídia
Faz o upload de uma imagem, vídeo ou PDF para anexar a uma chamada send posterior. Retorna o url_pk para referenciá-lo. Os arquivos são armazenados para a empresa da API key.
POST
/
v1
/
communications
/
media
/
Fazer upload de mídia
curl --request POST \
--url https://app.reinvented.education/api/v1/communications/media/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'name=<string>'import requests
url = "https://app.reinvented.education/api/v1/communications/media/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://app.reinvented.education/api/v1/communications/media/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"url_pk": 2207,
"media": "image",
"url": "https://cdn.example.com/media/promo.png",
"name": "promo.png"
}{
"email": [
"Enter a valid email address."
],
"selected_days": [
"Day funday is not valid."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "<string>"
}Autorizações
Corpo
multipart/form-data

