POST
/
enterprise
/
message
/
generate
curl --request POST \
  --url https://api.contiguity.co/enterprise/message/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "toNumber": "+1234567890",
  "fromNumber": "+0987654321",
  "embedText": "Contact a representative",
  "imageURL": "https://example.com/image.jpg?w=149px&h=149px",
  "companyName": "Twilio",
  "option": "contact_rep"
}'
{
  "code": 200,
  "message": "Generated Message Intent",
  "url": "https://api.contiguity.co/enterprise/message/intent?id=xxxxxx&fromNumber=string&toNumber=string&companyName=Twilio&option=text&embedText=title&imageURL=image",
  "options": {
    "name": "Twilio",
    "to": "string",
    "from": "string",
    "id": "f033895f34162765431fba4259bc42b7fcf",
    "option": "contact_rep"
  }
}

This endpoint is only available to Enterprise customers.

Authorizations

Authorization
string
header
required

Authentication using a Bearer Token. Specify Authorization: Token YOUR_TOKEN. Bearer is allowed.

Body

application/json
toNumber
string
required

The recipient's phone number

Example:

"+1234567890"

fromNumber
string
required

The sender's phone number (used to reopen conversation after option selection)

Example:

"+0987654321"

embedText
string
required

The Message Intent's title (should be fairly short)

Example:

"Contact a representative"

imageURL
string
required

URL to an image (must be less than 150px by 150px, 149px works best)

Example:

"https://example.com/image.jpg?w=149px&h=149px"

companyName
string
required

Your company's name

Example:

"Twilio"

option
string
required

Identifier for this Message Intent

Example:

"contact_rep"

Response

200
application/json
Message Intent generated successfully
code
integer
Example:

200

message
string
Example:

"Generated Message Intent"

url
string

The generated message intent URL

Example:

"https://api.contiguity.co/enterprise/message/intent?id=xxxxxx&fromNumber=string&toNumber=string&companyName=Twilio&option=text&embedText=title&imageURL=image"

options
object