Skip to main content
PUT
Pause or resume in-app message

Overview

Pause or resume delivery of an in-app message without making any other changes to it. A paused in-app message is not shown to anyone. Its content, schedule, and stats are kept. Use this endpoint to turn an in-app message on or off. To change its content, schedule, audience, or triggers, use Update in-app message.

How to use this API

Authenticate with your App API Key. Send enabled as a JSON boolean: false pauses the in-app message and true resumes it.
enabled must be a JSON boolean. A missing key, null, or a string such as "true" is rejected with a 400 and the in-app message does not change.
Resuming an in-app message that targets a paused Segment is rejected. Unpause the Segment or edit the in-app message’s audience first.

Permissions

An API key can pause and resume every in-app message in its app. A request made with an OAuth access token, such as through the OneSignal MCP server, acts with the role of the signed-in user. A role that cannot activate in-app messages, such as Composer, receives a 403 for both pausing and resuming.

Response

A successful request returns 200 OK with the in-app message’s new status:
status is disabled after pausing. After resuming it is active, scheduled, or complete, depending on the in-app message’s schedule.

Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required

Your App API key with prefix Key. See Keys & IDs.

Content-Type
string
default:application/json; charset=utf-8
required

Path Parameters

app_id
string
default:YOUR_APP_ID
required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

id
string
default:YOUR_IN_APP_MESSAGE_ID
required

UUID of the in-app message to pause or resume.

Body

application/json
enabled
boolean
required

true resumes delivery. false pauses it. Must be a JSON boolean: a missing key, null, or a string such as "true" is rejected.

Response

200

success
boolean

true when the request succeeded.

payload
object