Upload an image for a text (JPEG, PNG or GIF, at most 5 MB)
POST
/v1/mobile/workspace/texting/media
const url = 'https://api.vocapable.com/v1/mobile/workspace/texting/media';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contact_id":"example","content_base64":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/mobile/workspace/texting/media \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contact_id": "example", "content_base64": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
WorkspaceMessageMediaUpload
One image for a text to this customer, base64-encoded (at most 5 MB decoded).
The bytes decide its type (JPEG, PNG or GIF); metadata such as a photo’s location is removed before it is stored.
object
contact_id
required
Contact Id
string
content_base64
required
Content Base64
string
Examplegenerated
{ "contact_id": "example", "content_base64": "example"}Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}