Get SMS line campaign assignment
Get SMS line campaign assignment: getSmsLineCampaignAssignment in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/sms/lines/{resourceId}/campaign
Read the last confirmed campaign and current eligibility. Follow changes through their operations. Eligibility is a control-plane assessment, not a delivery or recipient-consent guarantee.
photon.projects.platforms.getSmsLineCampaignAssignment(input: GetSmsLineCampaignAssignmentInput, options?: RequestOptions): Promise<GetSmsLineCampaignAssignmentOutput>photon.projects.platforms.get_sms_line_campaign_assignment(input: GetSmsLineCampaignAssignmentInput, *, options: RequestOptions | None = None) -> models.GetSmsLineCampaignAssignmentResponseclient.get_sms_line_campaign_assignment(id: String, resource_id: String).await -> Result<ResponseValue<types::GetSmsLineCampaignAssignmentResponse>, Error<GetSmsLineCampaignAssignmentError>>client.Projects.Platforms.GetSmsLineCampaignAssignment(ctx context.Context, params *GetSmsLineCampaignAssignmentParams, opts ...RequestOption) (*GetSmsLineCampaignAssignmentResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.getSmsLineCampaignAssignment({
path: {
id: "id",
resourceId: "resourceId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import GetSmsLineCampaignAssignmentInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.get_sms_line_campaign_assignment(
GetSmsLineCampaignAssignmentInput.model_validate({
"path": {
"id": "id",
"resourceId": "resourceId",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.get_sms_line_campaign_assignment("id".to_owned(), "resourceId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Platforms.GetSmsLineCampaignAssignment(ctx, &photonapi.GetSmsLineCampaignAssignmentParams{
ID: "id",
ResourceID: "resourceId",
})
if err != nil {
return err
}
_ = result{
"campaign": null,
"eligibility": "eligible",
"reasonCode": null,
"resourceId": "string",
"version": 1
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 Current assignment, including an untouched version of 1. GetSmsLineCampaignAssignmentResponse
Headers: Cache-Control, ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: Cache-Control, ETag, Photon-Version. The raw response carries these headers; see Raw responses.