Skip to main content
POST
/
workspaces
/
{workspace}
/
contacts
/
number
/
{number}
/
messages
/
audio
Audio Message
curl --request POST \
  --url https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/number/{number}/messages/audio \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file": "https://example.com/audio.mp3"
}'
{
  "status": 201,
  "message": "Resource created successfully.",
  "data": {}
}
This endpoint allows you to send an audio message to a contact. You can provide the audio in two ways:
  1. Audio URL: Pass the audio URL in the request body.
  2. Uploaded File: Send the audio as a file using multipart/form-data.

File Field Requirements

  • file:
    • Required
    • Allowed MIME types: aac, amr, mp3, m4a, ogg
    • Maximum size: 16 MB (max:16384 KB)

Request Options

  • Audio URL Example (JSON):
    {
      "file": "https://example.com/audio.mp3"
    }
    
  • Uploaded File Example (multipart/form-data):
    POST /workspaces/{workspace}/contacts/number/{number}/messages/audio
    Content-Type: multipart/form-data
    
    file: [binary audio file]
    
Choose the method that best fits your use case.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace
string<uuid>
required

ID of the workspace.

number
string<uuid>
required

Number of the contact.

Body

application/json

Message sending parameters.

file
string
required

Audio URL.

Response

status
integer
required
Example:

201

message
string
required
Example:

"Resource created successfully."

data
object
required

Created resource data.