API referenceAdmin instagram controls

Admin instagram controls

6 operations. Every schema and example on this page is generated from the platform contract.

Instagram controls: the switches and the shops.

Internal-admin. The global switches (and whether the Vercel switch is on) and every shop with a connection or a decision.

auth internal-adminop adminInstagramControlsReadrate limitederrors

Response, 200

controlsobjectrequired
7 child fields
connect_enabledbooleanrequired

Instagram on for shops: screens, connecting, and a precondition of sending.

replies_enabledbooleanrequired

Automated sending, for every shop.

audienceenumrequired

test_shops, then allow_list (test shops + allowed shops), then everyone.

test_shopsallow_listeveryone
reasonstring, nullablerequired
updated_bystring, nullablerequired
updated_atstring, nullablerequired
vercel_switch_onbooleanrequired
shopsarray of objectrequired

Shops with an Instagram connection or a decision, at most 200.

11 child fields
store_idstringrequired
namestring, nullablerequired
is_testbooleanrequired
instagram_usernamestring, nullablerequired
connection_statusenumrequired
connectedneeds_reconnectdisconnected
not_receivingbooleanoptional

Connected, but Instagram has not agreed to send us her messages (webhooks_not_subscribed): nothing can fire.

paused_by_shopbooleanrequired

Her own Pause all.

allowedbooleanrequired
replies_suspendedbooleanrequired
reasonstring, nullablerequired
updated_atstring, nullablerequired
curl -G "https://www.membber.com/api/v1/admin-instagram-controls" \
  -H "Authorization: Bearer $MEMBBER_TOKEN"
Response, 200
{
  "controls": {
    "connect_enabled": true,
    "replies_enabled": true,
    "audience": "test_shops",
    "reason": "Added at the front desk",
    "updated_by": "<updated_by>",
    "updated_at": "<updated_at>",
    "vercel_switch_on": true
  },
  "shops": [
    {
      "store_id": "6659c139-0000-4000-8000-d0c500000066",
      "name": "Example name",
      "is_test": true,
      "instagram_username": "<instagram_username>",
      "connection_status": "connected",
      "not_receiving": true,
      "paused_by_shop": true,
      "allowed": true,
      "replies_suspended": true,
      "reason": "Added at the front desk",
      "updated_at": "<updated_at>"
    }
  ]
}

Instagram controls: set the global switches.

Internal-admin. Takes effect on the next message, no deploy. Audited with the reason.

Request body

connect_enabledbooleanrequired
replies_enabledbooleanrequired
audienceenumrequired
test_shopsallow_listeveryone
reasonstringrequired

Why (kept in the audit log and on the control; never shown to a shop).

Response, 200

controlsobjectrequired
7 child fields
connect_enabledbooleanrequired

Instagram on for shops: screens, connecting, and a precondition of sending.

replies_enabledbooleanrequired

Automated sending, for every shop.

audienceenumrequired

test_shops, then allow_list (test shops + allowed shops), then everyone.

test_shopsallow_listeveryone
reasonstring, nullablerequired
updated_bystring, nullablerequired
updated_atstring, nullablerequired
vercel_switch_onbooleanrequired
curl -X PUT "https://www.membber.com/api/v1/admin-instagram-controls" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "connect_enabled": true,
    "replies_enabled": true,
    "audience": "test_shops",
    "reason": "Added at the front desk"
  }'
Response, 200
{
  "controls": {
    "connect_enabled": true,
    "replies_enabled": true,
    "audience": "test_shops",
    "reason": "Added at the front desk",
    "updated_by": "<updated_by>",
    "updated_at": "<updated_at>",
    "vercel_switch_on": true
  }
}

Instagram controls: suspend or release one auto-reply.

Internal-admin. Suspended, it never sends and the shop cannot switch it back on. Audited.

Parameters

autoreplyIdstringpathrequired

Request body

suspendedbooleanrequired
reasonstringrequired

Why (kept in the audit log and on the control; never shown to a shop).

Response, 200

autoreplyobjectrequired
9 child fields
idstringrequired
keywordsarray of stringrequired
triggerenumrequired
commentsdmsboth
target_kindstringrequired
is_onbooleanrequired
suspendedbooleanrequired
suspended_reasonstring, nullablerequired
made_bystringrequired
created_atstringrequired
curl -X PUT "https://www.membber.com/api/v1/admin-instagram-controls/autoreplies/8b1a3916-0000-4000-8000-d0c50000008b" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "suspended": true,
    "reason": "Added at the front desk"
  }'
Response, 200
{
  "autoreply": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "keywords": [
      "<keyword>"
    ],
    "trigger": "comments",
    "target_kind": "<target_kind>",
    "is_on": true,
    "suspended": true,
    "suspended_reason": "Added at the front desk",
    "made_by": "<made_by>",
    "created_at": "<created_at>"
  }
}

Instagram controls: one shop and its auto-replies.

Internal-admin. Any shop, connected or not (to add it to the allow-list).

auth internal-adminop adminInstagramShopReadrate limitederrors

Parameters

storeIdstringpathrequired

Response, 200

shopobjectrequired
11 child fields
store_idstringrequired
namestring, nullablerequired
is_testbooleanrequired
instagram_usernamestring, nullablerequired
connection_statusenumrequired
connectedneeds_reconnectdisconnected
not_receivingbooleanoptional

Connected, but Instagram has not agreed to send us her messages (webhooks_not_subscribed): nothing can fire.

paused_by_shopbooleanrequired

Her own Pause all.

allowedbooleanrequired
replies_suspendedbooleanrequired
reasonstring, nullablerequired
updated_atstring, nullablerequired
autorepliesarray of objectrequired
9 child fields
idstringrequired
keywordsarray of stringrequired
triggerenumrequired
commentsdmsboth
target_kindstringrequired
is_onbooleanrequired
suspendedbooleanrequired
suspended_reasonstring, nullablerequired
made_bystringrequired
created_atstringrequired
curl -G "https://www.membber.com/api/v1/admin-instagram-controls/shops/8fb04ddc-0000-4000-8000-d0c50000008f" \
  -H "Authorization: Bearer $MEMBBER_TOKEN"
Response, 200
{
  "shop": {
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "name": "Example name",
    "is_test": true,
    "instagram_username": "<instagram_username>",
    "connection_status": "connected",
    "not_receiving": true,
    "paused_by_shop": true,
    "allowed": true,
    "replies_suspended": true,
    "reason": "Added at the front desk",
    "updated_at": "<updated_at>"
  },
  "autoreplies": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "keywords": [
        "<keyword>"
      ],
      "trigger": "comments",
      "target_kind": "<target_kind>",
      "is_on": true,
      "suspended": true,
      "suspended_reason": "Added at the front desk",
      "made_by": "<made_by>",
      "created_at": "<created_at>"
    }
  ]
}

Instagram controls: allow or suspend one shop.

Internal-admin. allowed: her place on the auto-replies allow-list. replies_suspended: none of her auto-replies send. Audited.

Parameters

storeIdstringpathrequired

Request body

allowedbooleanrequired
replies_suspendedbooleanrequired
reasonstringrequired

Why (kept in the audit log and on the control; never shown to a shop).

Response, 200

shopobjectrequired
11 child fields
store_idstringrequired
namestring, nullablerequired
is_testbooleanrequired
instagram_usernamestring, nullablerequired
connection_statusenumrequired
connectedneeds_reconnectdisconnected
not_receivingbooleanoptional

Connected, but Instagram has not agreed to send us her messages (webhooks_not_subscribed): nothing can fire.

paused_by_shopbooleanrequired

Her own Pause all.

allowedbooleanrequired
replies_suspendedbooleanrequired
reasonstring, nullablerequired
updated_atstring, nullablerequired
curl -X PUT "https://www.membber.com/api/v1/admin-instagram-controls/shops/8fb04ddc-0000-4000-8000-d0c50000008f" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "allowed": true,
    "replies_suspended": true,
    "reason": "Added at the front desk"
  }'
Response, 200
{
  "shop": {
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "name": "Example name",
    "is_test": true,
    "instagram_username": "<instagram_username>",
    "connection_status": "connected",
    "not_receiving": true,
    "paused_by_shop": true,
    "allowed": true,
    "replies_suspended": true,
    "reason": "Added at the front desk",
    "updated_at": "<updated_at>"
  }
}

Instagram controls: read a shop's recent comments and answer any that match.

Internal-admin. Sends real Private Replies through the normal reply code. A comment is only ever answered once. Audited with counts only.

Parameters

storeIdstringpathrequired

Response, 200

outcomeenumrequired
checkedrefusednot_connectednot_set_up
refused_reasonstring, nullablerequired

Instagram's refusal when reading, as our own short code.

posts_readintegerrequired
comments_readintegerrequired
sentintegerrequired
already_answeredintegerrequired
no_matchintegerrequired
off_for_shopintegerrequired
failedintegerrequired
failed_reasonsarray of stringrequired
curl -X POST "https://www.membber.com/api/v1/admin-instagram-controls/shops/8fb04ddc-0000-4000-8000-d0c50000008f/check-comments" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{}'
Response, 200
{
  "outcome": "checked",
  "refused_reason": "Added at the front desk",
  "posts_read": -9007199254740991,
  "comments_read": -9007199254740991,
  "sent": -9007199254740991,
  "already_answered": -9007199254740991,
  "no_match": -9007199254740991,
  "off_for_shop": -9007199254740991,
  "failed": -9007199254740991,
  "failed_reasons": [
    "Added at the front desk"
  ]
}
WhatsApp
Book a Call
Get Started
Admin instagram controls API | Membber Developers