POST
/
api
/
v2
/
agent
/
receiveMessage
Send message to an agent from your own platform
curl --request POST \
  --url https://api.vida.dev/api/v2/agent/receiveMessage \
  --header 'Content-Type: application/json' \
  --data '{
  "targetAgent": "agent123",
  "sourceAddress": "+15551231234",
  "message": "Hello there",
  "attachments": [
    {
      "type": "image",
      "url": "https://example.com/image.png"
    }
  ],
  "context": {
    "threadId": "abc123"
  },
  "metadata": {
    "key": "value"
  },
  "outboundMessageWebhookUrl": "https://example.com/hook"
}'
{
  "success": true,
  "messageUuid": "uuid"
}

Authorizations

token
string
query
required

Vida API Token

Body

application/json
targetAgent
string
required

Agent account ID, phone number, or username

Example:

"agent123"

sourceAddress
string
required

Sender phone number or address

Example:

"+15551231234"

message
string
required

Message text

Example:

"Hello there"

attachments
object[]
Example:
[
{
"type": "image",
"url": "https://example.com/image.png"
}
]
context
object
Example:
{ "threadId": "abc123" }
metadata
object
Example:
{ "key": "value" }
outboundMessageWebhookUrl
string

Webhook URL (POST) to deliver agent responses to. If not specified will look for default outboundMessageWebhookUrl webhook settings.

Example:

"https://example.com/hook"

Response

Message queued

success
boolean
Example:

true

messageUuid
string
Example:

"uuid"