Skip to main content
GET
/
v2
/
notify
/
management
/
subscriptions
/
{config_id}
/
phone_numbers
/
{phone_number}
Get subscription phone number status
curl --request GET \
  --url https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.prelude.dev/v2/notify/management/subscriptions/{config_id}/phone_numbers/{phone_number}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "config_id": "<string>",
  "phone_number": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "reason": "<string>"
}
{
"code": "<string>",
"message": "<string>",
"type": "<string>",
"request_id": "<string>"
}
{
"code": "<string>",
"message": "<string>",
"type": "<string>",
"request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

config_id
string
required

The subscription configuration ID

phone_number
string
required

The phone number in E.164 format (e.g., +33612345678)

Response

OK

config_id
string
required

The subscription configuration ID.

Example:

"subcfg_01k8ap1btqf5r9fq2c8ax5fhc9"

phone_number
string<phone_number>
required

The phone number in E.164 format.

Example:

"+33612345678"

state
enum<string>
required

The subscription state:

  • SUB - Subscribed (user can receive marketing messages)
  • UNSUB - Unsubscribed (user has opted out)
Available options:
SUB,
UNSUB
source
enum<string>
required

How the subscription state was changed:

  • MO_KEYWORD - User sent a keyword (STOP/START)
  • API - Changed via API
  • CSV_IMPORT - Imported from CSV
  • CARRIER_DISCONNECT - Automatically unsubscribed due to carrier disconnect
Available options:
MO_KEYWORD,
API,
CSV_IMPORT,
CARRIER_DISCONNECT
updated_at
string<date-time>
required

The date and time when the subscription status was last updated.

Example:

"2024-01-01T12:00:00Z"

reason
string

Additional context about the state change (e.g., the keyword that was sent).

Example:

"STOP"