Shopify Messaging API

Shopify Inbox is a web, Android, and iOS app that allows Shopify merchants to centralize their business conversations from SMS and messaging apps like Facebook Messenger. Your app can use the Messaging API to send messages to the Shopify Inbox app.

Getting started

Complete the following steps to use the Shopify Messaging API with your app:

  1. Contact the Messaging API team to request admission into the Messaging API beta test.

  2. Set your Inbox callback URL to receive Messaging API webhooks.

  3. Prompt the merchant to agree to the Messaging API access scopes in your app's OAuth.

  4. Use the merchant's shop data with the Shopify Messaging API endpoints.

Set your Inbox callback URL

Steps:

  1. In your Partner dashboard, click Apps.

  2. Create a new app, or select an existing app.

  3. Click Extensions.

  4. In the Inbox section, click Manage Inbox.

  5. In the Configure Inbox Messages Webhook section, enter your callback URL into the Message Webhook URL field.

  6. (Optional) In the Configure Inbox Settings Webhook section, enter your callback URL into the Settings Webhook URL field.

  7. Click Save.

Webhooks

The message_delivery event is sent to the Message Webhook URL when a staff member replies to a conversation in Inbox.

  {
    "event_type":"message_delivery",
    "event_data":{
        "message":{
          "id":"ff948rca-cbfa-445f-a8c3-e4485979a0df",
          "sender_id":"45cd831f-6b30-4ba0-acab-4869b2af3bfz",
          "sender":{
              "id":"74cd820f-6g30-4ba0-acab-4861b2af0bfa",
              "name":"Buddy Jenkins",
              "avatar":"http://monahanconsidine.io/felton",
              "group":"customer"
          },
          "type":"text",
          "content":{
              "text":"Eos quibusdam est sit laboriosam placeat est itaque omnis."
          },
          "sent_at":"2019-04-12T18:48:43.964495Z"
        },
        "conversation":{
          "id":"1f2d7b72-fg45-474f-a13a-09272a20195f",
          "name":"Eos aspernatur voluptatibus natus et et.",
          "source_type":null,
          "avatar":{
              "urls":null,
              "initials":null
          },
          "participants":{
              "counts":{
                "total":2
              },
              "data":[
                {
                    "id":"076c40f0-27cb-423f-9b5b-ee9ca76b3ff1",
                    "name":"Marilou O'Connell MD",
                    "avatar":"http://dare.io/emmet",
                    "group":"customer"
                },
                {
                    "id":"74cd820f-6g30-4ba0-acab-4861b2af0bfa",
                    "name":"Buddy Jenkins",
                    "avatar":"http://monahanconsidine.io/felton",
                    "group":"customer"
                }
              ]
          },
          "shopify_account":{
              "domain":"reichertkonopelski.co"
          }
        }
    },
    "message":{
        "id":"ff948rca-cbfa-445f-a8c3-e4485979a0df",
        "sender_id":"74cd820f-6g30-4ba0-acab-4861b2af0bfa",
        "sender":{
          "id":"74cd820f-6g30-4ba0-acab-4861b2af0bfa",
          "name":"Buddy Jenkins",
          "avatar":"http://monahanconsidine.io/felton",
          "group":"customer"
        },
        "type":"text",
        "content":{
          "text":"Eos quibusdam est sit laboriosam placeat est itaque omnis."
        },
        "sent_at":"2019-04-12T18:48:43.964495Z"
    },
    "conversation":{
        "id":"1f2d7b72-fg45-474f-a13a-09272a20195f",
        "name":"Eos aspernatur voluptatibus natus et et.",
        "source_type":null,
        "avatar":{
          "urls":null,
          "initials":null
        },
        "participants":{
          "counts":{
              "total":2
          },
          "data":[
              {
                "id":"076c40f0-27cb-423f-9b5b-ee9ca76b3ff1",
                "name":"Marilou O'Connell MD",
                "avatar":"http://dare.io/emmet",
                "group":"customer"
              },
              {
                "id":"74cd820f-6g30-4ba0-acab-4861b2af0bfa",
                "name":"Buddy Jenkins",
                "avatar":"http://monahanconsidine.io/felton",
                "group":"customer"
              }
          ]
        },
        "shopify_account":{
          "domain":"reichertkonopelski.co"
        }
    }
  }
  


The sync_availability event is sent to the Settings Webhook URL when a staff member sets availability in Inbox.

  {
    "event_type":"sync_availability",
    "event_data":{
        "shop_id":"1234567",
        "shop_domain":"reichertkonopelski.co",
        "availability_type":"days",
        "availability_rules":[{
          "day":"monday",
          "from":"2000-01-01T09:00:00.000000Z",
          "to":"2000-01-01T17:00:00.000000Z"
        }, {
          "day":"tuesday",
          "from":"2000-01-01T09:00:00.000000Z",
          "to":"2000-01-01T17:00:00.000000Z"
        }, {
          "day":"wednesday",
          "from":"2000-01-01T09:00:00.000000Z",
          "to":"2000-01-01T17:00:00.000000Z"
        }, {
          "day":"thursday",
          "from":"2000-01-01T09:00:00.000000Z",
          "to":"2000-01-01T17:00:00.000000Z"
        }, {
          "day":"friday",
          "from":"2000-01-01T09:00:00.000000Z",
          "to":"2000-01-01T17:00:00.000000Z"
        }],
        "time_zone":"Pacific Time (US & Canada)"
    }
  }
  

Additional information