ValeronDocs

Messages

Message a contact

POST/v1/threads

Requires the scope messages:write

Send a text from a line, or an email from a mailbox. When a conversation with that number or address exists, the message goes into it and the answer is a 200. Texts are charged.

#Header parameters

Idempotency-Keystring or null

#Request body

application/json
attachmentsobject[]
Default: []
Items: 0 to 10
Show child attributesHide child attributes
content_typestringrequired
datastringrequired
namestringrequired
bodystringrequired
contact_idstringrequired
htmlstring or null
line_idstring or null
mailbox_idstring or null
subjectstring or null

#Responses

201Successful Response
Show response fieldsHide response fields
idstringrequired
valuesobject (values: string | integer | number | boolean | string[] | object[] | object)required

#Errors

Errors use the standard error shape.

StatusMeaning
400The request is not valid.
401Not signed in, or the credentials are not valid.
402The balance is too low.
403Not allowed to do this.
404Not found.
409Conflicts with the current state.
413The request body is too large.
415The content type is not supported.
422A value in the request is not valid.
429Too many requests. Wait for Retry-After seconds.
500Something went wrong on our side.
502A service Valeron depends on refused the request.
503A service Valeron depends on is unavailable.