Public APIContacts
Create a contact
AuthorizationBearer <token>
API key in the Authorization: Bearer <key> header.
Keys are created in the SMAO dashboard (Settings → API Keys).
In: header
group_idstring
Match
^[a-f0-9]{24}$phone_numbersarray<string>
Items
1 <= itemsfirst_name?string
Default
""last_name?string
Default
""email?string
Email address. Empty string is accepted if you don't have the contact's email.
Default
""Format
emailcompany?string
Default
""prompt?string
Default
""preferred_language?string
Value in
"de" | "en" | "fr" | "it" | "de-CH" | "es" | "pt" | "tr" | "sv" | "fi" | "unknown"gender?string
Default
""forwarding_id?string|null
Default
nullMatch
^[a-f0-9]{24}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.smao.ai/api/v1/contacts" \ -H "Content-Type: application/json" \ -d '{ "group_id": "string", "phone_numbers": [ "+491701234567" ] }'{
"data": {
"id": "65f8fa6f1a9d8e0012ab34cd",
"group_id": "65a1234567890abcdef01234",
"group_name": "VIP Customers",
"phone_numbers": [
"+491701234567"
],
"first_name": "Ada",
"last_name": "Lovelace",
"email": "[email protected]",
"company": "Analytical Engine Inc",
"gender": "female",
"prompt": "string",
"preferred_language": "en",
"forwarding_id": "65a1234567890abcdef09999",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "validation_failed",
"message": "Validation failed"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API key"
}
}{
"error": {
"code": "subscription_required",
"message": "This feature is not available in your current subscription. Please upgrade to a higher plan"
}
}{
"error": {
"code": "forbidden",
"message": "No permission"
}
}{
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred."
}
}