curl -X POST \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/messages \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-H 'Content-Type: application/json' \
-d '{
"contacts": [{
"mobile": {
"number": "+1234567890",
"country": "US"
}
}],
"template": "Congratulations! You just sent your first message"
} '
{
"success": true,
"data": {
"messages": [
{
"id": "<string>",
"contact": {
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
},
"conversation": {
"id": "<string>",
"contact": {
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
},
"closed": "2023-11-07T05:31:56Z",
"lastMessage": {},
"phoneNumber": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"number": "<string>",
"country": "<string>",
"type": "<string>",
"verified": true,
"provider": "<string>",
"supportedDestinations": [
"<any>"
],
"forwardTo": {},
"universalReply": true,
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
"<any>"
],
"hosted": true
},
"group": {
"id": "<any>",
"name": "<any>"
},
"unread": [
"<string>"
],
"type": "<string>",
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
},
"group": {
"id": "<string>",
"name": "<string>",
"phoneNumbers?": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"number": "<string>",
"country": "<string>",
"type": "<string>",
"verified": true,
"provider": "<string>",
"supportedDestinations": [
"<any>"
],
"forwardTo": {},
"universalReply": true,
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
"<any>"
],
"hosted": true
}
],
"notifications": [
{
"destination": {
"id": "<string>",
"name": "<string>"
},
"integration": "<string>",
"group": {
"id": "<any>",
"name": "<any>"
}
}
],
"tags": [
"<string>"
],
"users": [
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"role": "Administrator"
}
],
"senders": [
{
"id": "<string>",
"type": "phonenumber",
"subType": "<string>",
"status": "<string>",
"identifier": "<string>",
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
{
"id": "<any>",
"name": "<any>"
}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
}
],
"officeHours": {
"active": true,
"timezone": "<string>",
"times": {
"sun": [
{
"start": "<any>",
"end": "<any>"
}
],
"mon": [
{
"start": "<any>",
"end": "<any>"
}
],
"tue": [
{
"start": "<any>",
"end": "<any>"
}
],
"wed": [
{
"start": "<any>",
"end": "<any>"
}
],
"thu": [
{
"start": "<any>",
"end": "<any>"
}
],
"fri": [
{
"start": "<any>",
"end": "<any>"
}
],
"sat": [
{
"start": "<any>",
"end": "<any>"
}
]
}
},
"isDefault": true,
"useSharedPool": true
},
"type": "<string>",
"message": "<string>",
"template": "<string>",
"outgoing": true,
"phoneNumber": "+1234567890",
"price": 123,
"segments": 123,
"read": true,
"status": "<string>",
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"sendAt": "2023-11-07T05:31:56Z",
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
}
],
"jobId": "<string>",
"requested": 123,
"valid": 123,
"invalid": [
{
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
}
],
"estimatedPrice": 123
}
}
curl -X POST \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/messages \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-H 'Content-Type: application/json' \
-d '{
"contacts": [{
"mobile": {
"number": "+1234567890",
"country": "US"
}
}],
"template": "Congratulations! You just sent your first message"
} '
{
"success": true,
"data": {
"messages": [
{
"id": "<string>",
"contact": {
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
},
"conversation": {
"id": "<string>",
"contact": {
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
},
"closed": "2023-11-07T05:31:56Z",
"lastMessage": {},
"phoneNumber": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"number": "<string>",
"country": "<string>",
"type": "<string>",
"verified": true,
"provider": "<string>",
"supportedDestinations": [
"<any>"
],
"forwardTo": {},
"universalReply": true,
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
"<any>"
],
"hosted": true
},
"group": {
"id": "<any>",
"name": "<any>"
},
"unread": [
"<string>"
],
"type": "<string>",
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
},
"group": {
"id": "<string>",
"name": "<string>",
"phoneNumbers?": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"number": "<string>",
"country": "<string>",
"type": "<string>",
"verified": true,
"provider": "<string>",
"supportedDestinations": [
"<any>"
],
"forwardTo": {},
"universalReply": true,
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
"<any>"
],
"hosted": true
}
],
"notifications": [
{
"destination": {
"id": "<string>",
"name": "<string>"
},
"integration": "<string>",
"group": {
"id": "<any>",
"name": "<any>"
}
}
],
"tags": [
"<string>"
],
"users": [
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"role": "Administrator"
}
],
"senders": [
{
"id": "<string>",
"type": "phonenumber",
"subType": "<string>",
"status": "<string>",
"identifier": "<string>",
"channels": {
"sms": "<any>",
"voice": "<any>",
"whatsapp": "<any>"
},
"groups": [
{
"id": "<any>",
"name": "<any>"
}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
}
],
"officeHours": {
"active": true,
"timezone": "<string>",
"times": {
"sun": [
{
"start": "<any>",
"end": "<any>"
}
],
"mon": [
{
"start": "<any>",
"end": "<any>"
}
],
"tue": [
{
"start": "<any>",
"end": "<any>"
}
],
"wed": [
{
"start": "<any>",
"end": "<any>"
}
],
"thu": [
{
"start": "<any>",
"end": "<any>"
}
],
"fri": [
{
"start": "<any>",
"end": "<any>"
}
],
"sat": [
{
"start": "<any>",
"end": "<any>"
}
]
}
},
"isDefault": true,
"useSharedPool": true
},
"type": "<string>",
"message": "<string>",
"template": "<string>",
"outgoing": true,
"phoneNumber": "+1234567890",
"price": 123,
"segments": 123,
"read": true,
"status": "<string>",
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"sendAt": "2023-11-07T05:31:56Z",
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {}
}
}
],
"jobId": "<string>",
"requested": 123,
"valid": 123,
"invalid": [
{
"id": "<string>",
"email": "chris@sakari.io",
"firstName": "Chris",
"lastName": "Bloggs",
"mobile": {
"country": "<string>",
"number": "123-456-7890",
"verified": "2023-11-07T05:31:56Z",
"valid": true,
"lineType": "mobile"
},
"lists": [
{
"id": "<any>",
"name": "<any>",
"source": "<any>",
"keyword": "<any>",
"doubleOptIn": "<any>",
"filter": "<any>",
"optInConfirmation": "<any>",
"optIn": "<any>",
"optOut": "<any>"
}
],
"attributes": {},
"optIn": "2023-11-07T05:31:56Z",
"blocked": "2023-11-07T05:31:56Z",
"activecampaign": {
"id": 123
},
"hubspot": {
"id": 123
},
"pipedrive": {
"id": 123
},
"valid": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<any>",
"name": "<any>",
"firstName": "<any>",
"lastName": "<any>",
"email": "<any>",
"source": "<any>",
"subSource": "<any>"
}
}
}
],
"estimatedPrice": 123
}
}
The access token received from the authorization server in the OAuth 2.0 flow.
Account to apply operations to
successful operation
The response is of type object
.