Get outbound Instagram message logs Early access
Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours.
Authorizations:
Request rate limit:
query Parameters
sender | string The sender ID which can be alphanumeric or numeric. |
destination | string Message destination address. |
bulkId | Array of strings Example: bulkId=BULK-ID-123-xyz Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. May contain multiple comma-separated values. Maximum length 2048 characters. |
messageId | Array of strings Example: messageId=MESSAGE-ID-123-xyz,MESSAGE-ID-124-xyz Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters. |
generalStatus | string Enum: "ACCEPTED" "PENDING" "UNDELIVERABLE" "DELIVERED" "EXPIRED" "REJECTED" Status group name that describes which category the status code belongs to, i.e., PENDING, UNDELIVERABLE, DELIVERED, EXPIRED, REJECTED. |
sentSince | string <date-time> Example: sentSince=2020-02-22T17:42:05.390+01:00 The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. |
sentUntil | string <date-time> Example: sentUntil=2020-02-23T17:42:05.390+01:00 The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. |
limit | integer <int32> <= 1000 Default: 50 Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages. |
entityId | string Example: entityId=promotional-traffic-entity Entity id used to send the message. For more details, see our documentation. |
applicationId | string Example: applicationId=marketing-automation-application Application id used to send the message. For more details, see our documentation. |
campaignReferenceId | Array of strings Example: campaignReferenceId=summersale ID of a campaign that was sent in the message. May contain multiple comma-separated values. |
Responses
OK
Unauthorized
Forbidden
Too Many Requests
Internal Server Error
Request samples
- cURL
- Java
- C#
- Go
- Python
- PHP
- JavaScript
- NodeJs
- Ruby
curl -L -g 'https://{baseUrl}/instagram/1/logs?bulkId=BULK-ID-123-xyz&messageId=MESSAGE-ID-123-xyz%2CMESSAGE-ID-124-xyz&sentSince=2020-02-22T17%3A42%3A05.390%2B01%3A00&sentUntil=2020-02-23T17%3A42%3A05.390%2B01%3A00&entityId=promotional-traffic-entity&applicationId=marketing-automation-application&campaignReferenceId=summersale' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json'
Response samples
- 200
- 401
- 403
- 429
- 500
{- "results": [
- {
- "sender": "44113496000",
- "destination": "66855538125",
- "bulkId": "2034072219640523072",
- "messageId": "2250be2d4219-3af1-78856-aabe-1362af1edfd2",
- "sentAt": "2023-02-01T23:15:03.379+0000",
- "doneAt": "2023-02-01T23:16:34.582+0000",
- "messageCount": 1,
- "price": {
- "pricePerMessage": 0.15,
- "currency": "EUR"
}, - "status": {
- "groupId": 3,
- "groupName": "DELIVERED",
- "id": 5,
- "name": "DELIVERED_TO_HANDSET",
- "description": "Message delivered to handset"
}, - "error": {
- "groupId": 0,
- "groupName": "OK",
- "id": 0,
- "name": "NO_ERROR",
- "description": "No Error",
- "permanent": false
}, - "platform": {
- "entityId": "promotional-traffic-entity",
- "applicationId": "marketing-automation-application"
}, - "content": {
- "text": "Sent text",
- "type": "TEXT"
}
}
]
}
Need assistance
Encountering issues
What's new? Check out
Unsure about a term? See